| gnu.expr.TypeValue
All known Subclasses: gnu.kawa.reflect.OccurrenceType, gnu.kawa.xml.NodeType, gnu.kawa.xml.AttributeType, gnu.kawa.lispexpr.LangObjType, gnu.kawa.lispexpr.LangPrimType, gnu.kawa.xml.ElementType, gnu.kawa.xml.ProcessingInstructionType, gnu.kawa.xml.XDataType,
TypeValue | public interface TypeValue (Code) | | A Type or a Type expression.
Can be used for higher-level types that do not map directly to a Type.
|
Method Summary | |
public void | emitIsInstance(Variable incoming, Compilation comp, Target target) Emit code for incoming instanceof this_type.
The implementation can use
gnu.kawa.reflect.InstanceOf.emitIsInstance InstanceOf.emitIsInstance which is a conveniece method that calls
TypeValue.emitTestIf emitTestIf .
Parameters: incoming - Contains the value we are testing to see if it has thethe type of 'this'. | public void | emitTestIf(Variable incoming, Declaration decl, Compilation comp) 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 thetype of this. | public Procedure | getConstructor() Get the constructor function for this type. | public Type | getImplementationType() The lower-level Type used to represent instances of this type. |
emitIsInstance | public void emitIsInstance(Variable incoming, Compilation comp, Target target)(Code) | | Emit code for incoming instanceof this_type.
The implementation can use
gnu.kawa.reflect.InstanceOf.emitIsInstance InstanceOf.emitIsInstance which is a conveniece method that calls
TypeValue.emitTestIf emitTestIf .
Parameters: incoming - Contains the value we are testing to see if it has thethe type of 'this'. If null, use top-of-stack. Parameters: comp - The compilation state. Parameters: target - Where to leave the result. |
emitTestIf | public void emitTestIf(Variable incoming, Declaration decl, Compilation comp)(Code) | | 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 thetype of this. If null, use top-of-stack.May not be null if incoming is non-null. Parameters: decl - If non-null, assign value after coercion to Declaration. Parameters: comp - The compilation state. |
getConstructor | public Procedure getConstructor()(Code) | | 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 ( methods) should be used.
|
getImplementationType | public Type getImplementationType()(Code) | | The lower-level Type used to represent instances of this type.
|
|
|