public interface TypeValue
extends java.lang.reflect.Type
Modifier and Type | Method and Description |
---|---|
Expression |
convertValue(Expression value)
Return converted expression or null.
|
void |
emitIsInstance(Variable incoming,
Compilation comp,
Target target)
Emit code for incoming instanceof this_type.
|
void |
emitTestIf(Variable incoming,
Declaration decl,
Compilation comp)
Emit code for
if (incoming instanceof this_type) decl = incoming ....
|
default java.lang.String |
encodeType(Language language) |
Procedure |
getConstructor()
Get the constructor function for this type.
|
Type |
getImplementationType()
The lower-level Type used to represent instances of this type.
|
Type getImplementationType()
void emitTestIf(Variable incoming, Declaration decl, Compilation comp)
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.void emitIsInstance(Variable incoming, Compilation comp, Target target)
InstanceOf
.emitIsInstance
which is a conveniece method that calls
emitTestIf
.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.Procedure getConstructor()
<init>
methods) should be used.Expression convertValue(Expression value)
default java.lang.String encodeType(Language language)