public class SeqSizeType extends LangObjType
[pat1 ... panN] patterns.LangObjType.ArgListBuilder, LangObjType.SimpleVectorBuilderType.NeverReturnsargListType, argVectorType, bitvectorType, c16vectorType, constVectorType, dflonumType, dynamicType, f32vectorType, f64vectorType, filepathType, gvectorType, integerType, istringType, jstringType, listType, numericType, pathType, procedureType, promiseType, rationalType, realType, regexType, s16vectorType, s32vectorType, s64vectorType, s8vectorType, sequenceType, stringType, typeClass, typeClassType, typeLangObjType, typeType, u16vectorType, u32vectorType, u64vectorType, u8vectorType, URIType, vectorTypeimplementationTypeflagsboolean_ctype, boolean_type, booleanType, booleanValue_method, byte_type, byteType, char_type, charType, clone_method, double_type, doubleType, doubleValue_method, errorType, float_type, floatType, floatValue_method, int_type, intType, intValue_method, java_lang_Class_type, javalangannotationAnnotationType, javalangBooleanType, javalangCharacterType, javalangClassType, javalanginvokeMethodHandleType, javalangNumberType, javalangObjectType, javalangStringType, javalangThrowableType, long_type, longType, longValue_method, neverReturnsType, nullType, number_type, objectType, pointer_type, reflectClass, short_type, shortType, string_type, throwable_type, toString_method, tostring_type, toStringType, typeArray0, void_type, voidType| Constructor and Description |
|---|
SeqSizeType(int requiredSize,
boolean requiredExact) |
SeqSizeType(java.lang.String name,
int requiredSize,
boolean requiredExact,
java.lang.String implClass) |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkSizeEq(java.util.List list,
int requiredSize) |
static void |
checkSizeGe(java.util.List list,
int requiredSize) |
static java.util.List |
coerceEq(java.lang.Object object,
int requiredSize) |
static java.util.List |
coerceEqOrNull(java.lang.Object object,
int requiredSize) |
java.lang.Object |
coerceFromObject(java.lang.Object obj)
Convert an object to a value of this Type.
|
static java.util.List |
coerceGe(java.lang.Object object,
int requiredSize) |
static java.util.List |
coerceGeOrNull(java.lang.Object object,
int requiredSize) |
int |
compare(Type other)
Return a numeric code showing "subtype" relationship:
1: if other is a pure subtype of this;
0: if has the same values;
-1: if this is a pure subtype of other;
-2: if they have values in common but neither is a subtype of the other;
-3: if the types have no values in common.
|
void |
emitCoerceFromObject(CodeAttr code)
Compile (in given method) cast from Object to this Type.
|
boolean |
emitCoercionOrNull(CodeAttr code) |
int |
isCompatibleWithValue(Type valueType)
If this is the target type, is a given source type compatible?
|
boolean |
isInterface() |
coerceDFloNum, coerceIntNum, coerceNumeric, coerceRatNum, coerceRealNum, coerceToClass, coerceToClassOrNull, coerceToClassType, coerceToClassTypeOrNull, coerceToConstVector, coerceToProcedure, coerceToProcedureOrNull, coerceToType, coerceToTypeOrNull, coerceToU8Vector, coercionOrNullMethod, convertValue, elementGetterMethodName, elementSetterMethodName, emitConvertFromPrimitive, emitIsInstance, emitTestIf, encodeType, getBuildObject, getConstructor, getConstructorType, getElementType, getInstanceFromClassgetDeclaredMethod, getField, getImplementationType, getInterfaces, getMethod, getMethods, getRealType, getReflectClass, getSuperclassgetContextClass, getContextClassLoader, getInternalName, getMethods, isExisting, isInstance, setExistingcoerceToObject, emitCoerceToObject, emitIsInstance, getGenericSignature, getMaybeGenericSignature, getName, getRawType, getSignature, getSize, getSizeInWords, getType, hashCode, isCompatibleWithValue, isMoreSpecific, isSame, isSubtype, isValidJavaTypeName, isVoid, lookupType, lowestCommonSharedType, lowestCommonSuperType, make, make, printSignature, promote, promoteIfUnsigned, registerTypeForClass, setGenericSignature, setName, setReflectClass, setSignature, signatureLength, signatureLength, signatureToName, signatureToPrimitive, signatureToType, signatureToType, swappedCompareResult, toStringclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitgetImplementationTypepublic SeqSizeType(java.lang.String name,
int requiredSize,
boolean requiredExact,
java.lang.String implClass)
public SeqSizeType(int requiredSize,
boolean requiredExact)
public java.lang.Object coerceFromObject(java.lang.Object obj)
TypecoerceFromObject in class LangObjTypepublic static void checkSizeEq(java.util.List list,
int requiredSize)
public static void checkSizeGe(java.util.List list,
int requiredSize)
public static java.util.List coerceEq(java.lang.Object object,
int requiredSize)
public static java.util.List coerceGe(java.lang.Object object,
int requiredSize)
public static java.util.List coerceEqOrNull(java.lang.Object object,
int requiredSize)
public static java.util.List coerceGeOrNull(java.lang.Object object,
int requiredSize)
public void emitCoerceFromObject(CodeAttr code)
ObjectTypeemitCoerceFromObject in class LangObjTypepublic boolean emitCoercionOrNull(CodeAttr code)
emitCoercionOrNull in class LangObjTypepublic int isCompatibleWithValue(Type valueType)
TypeisCompatibleWithValue in class LangObjTypepublic boolean isInterface()
isInterface in class Typepublic int compare(Type other)
Typecompare in class LangObjType