public class SeqSizeType extends LangObjType
[pat1 ... panN]
patterns.LangObjType.ArgListBuilder, LangObjType.SimpleVectorBuilder
Type.NeverReturns
argListType, 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, vectorType
implementationType
flags
boolean_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, getInstanceFromClass
getDeclaredMethod, getField, getImplementationType, getInterfaces, getMethod, getMethods, getRealType, getReflectClass, getSuperclass
getContextClass, getContextClassLoader, getInternalName, getMethods, isExisting, isInstance, setExisting
coerceToObject, 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, toString
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
getImplementationType
public 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)
Type
coerceFromObject
in class LangObjType
public 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)
ObjectType
emitCoerceFromObject
in class LangObjType
public boolean emitCoercionOrNull(CodeAttr code)
emitCoercionOrNull
in class LangObjType
public int isCompatibleWithValue(Type valueType)
Type
isCompatibleWithValue
in class LangObjType
public boolean isInterface()
isInterface
in class Type
public int compare(Type other)
Type
compare
in class LangObjType