jltools.ext.jl.ast
Class Field_c
java.lang.Object
|
+--jltools.ext.jl.ast.Node_c
|
+--jltools.ext.jl.ast.Expr_c
|
+--jltools.ext.jl.ast.Field_c
- All Implemented Interfaces:
- java.lang.Cloneable, Copy, Expr, Field, Node, Prefix, Receiver, java.io.Serializable, Typed
- public class Field_c
- extends Expr_c
- implements Field
A Field
is an immutable representation of a Java field
access. It consists of field name and may also have either a
Type
or an Expr
containing the field being
accessed.
- See Also:
- Serialized Form
Fields inherited from class jltools.ext.jl.ast.Expr_c |
type |
Methods inherited from class jltools.ext.jl.ast.Node_c |
buildTypes, buildTypesOverride_, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride_, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride_, disambiguateTypesOverride, enterScope, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride_, foldConstantsOverride, leaveScope, position, position, reconstructTypes, translate, translateBlock, translateSubstmt, typeCheck, typeCheckOverride_, typeCheckOverride, visit, visitList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jltools.ast.Expr |
type |
Methods inherited from interface jltools.ast.Node |
buildTypes_, buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, dump, enterScope, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, leaveScope, position, position, reconstructTypes_, typeCheckOverride_, visit |
Methods inherited from interface jltools.ast.Typed |
type |
target
protected Receiver target
name
protected java.lang.String name
fi
protected FieldInstance fi
Field_c
public Field_c(Ext ext,
Position pos,
Receiver target,
java.lang.String name)
precedence
public Precedence precedence()
- Get the precedence of the field.
- Specified by:
precedence
in interface Expr
- Overrides:
precedence
in class Expr_c
target
public Receiver target()
- Get the target of the field.
- Specified by:
target
in interface Field
target
public Field target(Receiver target)
- Set the target of the field.
- Specified by:
target
in interface Field
name
public java.lang.String name()
- Get the name of the field.
- Specified by:
name
in interface Field
name
public Field name(java.lang.String name)
- Set the name of the field.
- Specified by:
name
in interface Field
fieldInstance
public FieldInstance fieldInstance()
- Get the field instance of the field.
- Specified by:
fieldInstance
in interface Field
fieldInstance
public Field fieldInstance(FieldInstance fi)
- Set the field instance of the field.
- Specified by:
fieldInstance
in interface Field
reconstruct
protected Field_c reconstruct(Receiver target)
- Reconstruct the field.
visitChildren
public Node visitChildren(NodeVisitor v)
- Visit the children of the field.
- Specified by:
visitChildren
in interface Node
- Overrides:
visitChildren
in class Node_c
typeCheck_
public Node typeCheck_(TypeChecker tc)
throws SemanticException
- Type check the field.
- Specified by:
typeCheck_
in interface Node
- Overrides:
typeCheck_
in class Node_c
exceptionCheck_
public Node exceptionCheck_(ExceptionChecker ec)
throws SemanticException
- Check exceptions thrown by the field.
- Specified by:
exceptionCheck_
in interface Node
- Overrides:
exceptionCheck_
in class Node_c
toString
public java.lang.String toString()
- Overrides:
toString
in class Node_c
translate_
public void translate_(CodeWriter w,
Translator tr)
- Write the field to an output file.
- Specified by:
translate_
in interface Node
- Overrides:
translate_
in class Node_c
- Following copied from interface:
jltools.ast.Node
- Parameters:
w
- The code writer to which to write.tr
- The translation pass. This is not a visitor.