本文整理汇总了Java中com.sun.corba.se.impl.io.TypeMismatchException类的典型用法代码示例。如果您正苦于以下问题:Java TypeMismatchException类的具体用法?Java TypeMismatchException怎么用?Java TypeMismatchException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TypeMismatchException类属于com.sun.corba.se.impl.io包,在下文中一共展示了TypeMismatchException类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: serialize
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
@Override
public void serialize(ExtractionFunctionDimension value, JsonGenerator gen, SerializerProvider provider)
throws IOException {
if (!LookupDimension.class.isInstance(value) && !RegisteredLookupDimension.class.isInstance(value)) {
throw new TypeMismatchException("Lookup dimension serializer was given a non-lookup dimension.");
}
Optional<ExtractionFunction> extractionFunction = value.getExtractionFunction();
// Use DimensionToDefaultDimensionSpec serializer if LookupDimension does not contain any namespace or lookups
// or is not the inner most query
if (!extractionFunction.isPresent() || SerializerUtil.hasInnerQuery(gen)) {
JsonSerializer<Object> dimensionSerializer = provider.findValueSerializer(Dimension.class);
dimensionSerializer.serialize(value, gen, provider);
return;
}
String apiName = value.getApiName();
String physicalName = SerializerUtil.findPhysicalName(value, gen).orElseThrow(() -> {
LOG.error(ErrorMessageFormat.PHYSICAL_NAME_NOT_FOUND.logFormat(value.getApiName()));
return new IllegalStateException(ErrorMessageFormat.PHYSICAL_NAME_NOT_FOUND.format());
}
);
gen.writeObject(new ExtractionDimensionSpec(physicalName, apiName, extractionFunction.get()));
}
开发者ID:yahoo,项目名称:fili,代码行数:28,代码来源:LookupDimensionToDimensionSpec.java
示例2: Encode
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
public Encode(Object toEncoder) throws Exception {
for (Class c : acceptableConstructorInputs) {
if (c.equals(toEncoder.getClass())) {
break;
} else if (acceptableConstructorInputs.indexOf(c) == acceptableConstructorInputs.size()-1) {
throw new TypeMismatchException();
}
}
this.toBeProcessed = toEncoder;
}
开发者ID:Matthewacon,项目名称:Octopressor,代码行数:12,代码来源:Encode.java
示例3: UniversalOutcomeGenerator
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
public UniversalOutcomeGenerator(Enum numberSystem) {
for (Class c : acceptableEnumClasses) {
if (numberSystem.getClass().equals(c)) {
ns = numberSystem;
break;
} else if(c.equals(acceptableEnumClasses.get(acceptableEnumClasses.size()-1))) {
throw new TypeMismatchException();
}
}
nslength = ((ns.getClass().equals(CommonNumeralSystems.class)) ? ((CommonNumeralSystems)ns)
: ((ns.getClass().equals(UncommonNumeralSystems.class)) ? ((UncommonNumeralSystems)ns)
: ((BaseNumberSystems)ns))).getBaseValues();
calculateCharValues(nslength);
}
开发者ID:Matthewacon,项目名称:Octopressor,代码行数:15,代码来源:UniversalOutcomeGenerator.java
示例4: toDxPath
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
static DxPath toDxPath(Path obj) {
if (obj == null)
throw new NullPointerException();
if (!(obj instanceof DxPath))
throw new TypeMismatchException(); //ProviderMismatchException();
return (DxPath)obj;
}
开发者ID:nextflow-io,项目名称:jdk7-dxfs,代码行数:8,代码来源:DxPath.java
示例5: createForJavaType
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
public String createForJavaType(Serializable ser)
throws TypeMismatchException
{
return RepositoryId.createForJavaType(ser);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:RepIdDelegator.java
示例6: createForJavaType
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
String createForJavaType(Serializable ser)
throws TypeMismatchException;
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:3,代码来源:RepositoryIdStrings.java
示例7: createForJavaType
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
public String createForJavaType(Serializable ser)
throws TypeMismatchException
{
return RepositoryId_1_3_1.createForJavaType(ser);
}
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:6,代码来源:RepIdDelegator_1_3_1.java
示例8: createForJavaType
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
public String createForJavaType(Serializable ser)
throws TypeMismatchException
{
return RepositoryId_1_3.createForJavaType(ser);
}
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:6,代码来源:RepIdDelegator_1_3.java
注:本文中的com.sun.corba.se.impl.io.TypeMismatchException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论