Package gnu.expr
Interface TypeValue
- All Superinterfaces:
Type
- All Known Implementing Classes:
AttributeType,ElementType,GenArrayType,LangObjType,LangPrimType,MappedArrayType,MultValuesType,NodeSetType,NodeType,OccurrenceType,ProcessingInstructionType,SeqSizeType,XDataType,XIntegerType,XStringType,XTimeType
A Type or a Type expression.
Can be used for higher-level types that do not map directly to a Type.
-
Method Summary
Modifier and TypeMethodDescriptionconvertValue(Expression value) Return converted expression or null.voidemitIsInstance(Variable incoming, Compilation comp, Target target) Emit code for incoming instanceof this_type.voidemitTestIf(Variable incoming, Declaration decl, Compilation comp) Emit code for if (incoming instanceof this_type) decl = incoming ....default StringencodeType(Language language) Get the constructor function for this type.The lower-level Type used to represent instances of this type.Methods inherited from interface java.lang.reflect.Type
getTypeName
-
Method Details
-
getImplementationType
Type getImplementationType()The lower-level Type used to represent instances of this type. -
emitTestIf
Emit code for if (incoming instanceof this_type) decl = incoming .... This method is designed for typeswitch applications, where this call is the first part of a conditional, so it must be followed by calls to emitElse and emitFi.- Parameters:
incoming- Contains the value we are testing to see if it has the type of this. If null, use top-of-stack. May not be null if decl is non-null.decl- If non-null, assign value after coercion to Declaration.comp- The compilation state.
-
emitIsInstance
Emit code for incoming instanceof this_type. The implementation can useInstanceOf .emitIsInstancewhich is a conveniece method that callsemitTestIf.- Parameters:
incoming- Contains the value we are testing to see if it has the the type of 'this'. If null, use top-of-stack.comp- The compilation state.target- Where to leave the result.
-
getConstructor
Procedure getConstructor()Get the constructor function for this type. Returns null if there is no contructor function. Also returns null if this extends ClassType or ArrayType and standard Java constructors (<init>methods) should be used. -
convertValue
Return converted expression or null. -
encodeType
-