本文整理汇总了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()));
}
示例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;
}
示例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);
}
示例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;
}
示例5: createForJavaType
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
public String createForJavaType(Serializable ser)
throws TypeMismatchException
{
return RepositoryId.createForJavaType(ser);
}
示例6: createForJavaType
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
String createForJavaType(Serializable ser)
throws TypeMismatchException;
示例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);
}
示例8: createForJavaType
import com.sun.corba.se.impl.io.TypeMismatchException; //导入依赖的package包/类
public String createForJavaType(Serializable ser)
throws TypeMismatchException
{
return RepositoryId_1_3.createForJavaType(ser);
}