|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This type represents a field declaration in the syntax tree.
| Method Summary | |
CSourceField |
checkInterface(CClassContextType context)
Checks the basic interfaces to make sure things generally look OK. |
void |
genCode(CodeSequence code)
Generates a sequence of bytecodes |
CType |
getType()
Returns the type of this field |
boolean |
hasInitializer()
Returns true if this field declarator has an initializer (should be initialized) |
String |
ident()
Returns the identifier of this field declaration |
long |
modifiers()
Returns the modifiers of this field declaration |
boolean |
needInitialization()
Returns true if this field need to be initialized WARNING: this method returns true when initial value corresponds to a default value ====> a second check should be made after typecheck to ensure that an initialization is really needed |
void |
typecheck(CFlowControlContextType context)
Checks whether this field declaration includes a field initializer and mutates the context to store this information about the field. |
JVariableDefinition |
variable()
|
| Methods inherited from interface org.multijava.mjc.JMemberDeclarationType |
accept, genComments, getCClass, getField, getMethod, isDeprecated |
| Methods inherited from interface org.multijava.util.compiler.PhylumType |
getTokenReference, setTokenReference |
| Methods inherited from interface org.multijava.javadoc.Annotatable |
javadocComment |
| Method Detail |
public boolean hasInitializer()
public CType getType()
public boolean needInitialization()
public JVariableDefinition variable()
public long modifiers()
modifiers in interface JMemberDeclarationTypepublic String ident()
ident in interface JMemberDeclarationType
public CSourceField checkInterface(CClassContextType context)
throws PositionedError
PositionedError - an error with reference to the source file
public void typecheck(CFlowControlContextType context)
throws PositionedError
context - the context in which this field is declared
PositionedError - if any checks fail public void genCode(CodeSequence code)
code - the code list
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||