net.janino
Class Java.FieldDeclarator
java.lang.Object
|
+--net.janino.Java.Located
|
+--net.janino.Java.BlockStatement
|
+--net.janino.Java.Statement
|
+--net.janino.Java.FieldDeclarator
- All Implemented Interfaces:
- Java.Locatable, Java.Scope
- Enclosing class:
- Java
- public static class Java.FieldDeclarator
- extends Java.Statement
This class is derived from "Statement", because it provides for the
initialization of the field. In other words, "compile()" generates the
code that initializes the field.
Methods inherited from class net.janino.Java.BlockStatement |
addConstantFloatInfo, addConstantIntegerInfo, addConstantStringInfo, allocateLocalVariable, compileError, createDummyCodeAttribute, getLocation, newInserter, newOffset, newUnsetOffset, popInserter, pushInserter, restoreLocalVariables, saveLocalVariables, throwParseException, write, writeBranch, writeByte, writeConstantClassInfo, writeConstantDoubleInfo, writeConstantFieldrefInfo, writeConstantFloatInfo, writeConstantIntegerInfo, writeConstantInterfaceMethodrefInfo, writeConstantLongInfo, writeConstantMethodrefInfo, writeConstantStringInfo, writeInt, writeOffset, writeOpcode, writeShort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Java.FieldDeclarator
public Java.FieldDeclarator(Scanner.Location location,
Java.ClassOrInterfaceDeclaration declaringClassOrInterface,
short modifiers,
Java.Type type,
Java.VariableDeclarator[] variableDeclarators)
getIFields
public IClass.IField[] getIFields()
generatesCode
public boolean generatesCode()
throws Java.CompileException
- Override
Java.Statement.generatesCode()
, because code is only generated if at
least one of the declared variables has a non-constant-final initializer.
- Overrides:
generatesCode
in class Java.Statement
compile
public boolean compile()
throws Java.CompileException
- Overrides:
compile
in class Java.Statement
- Following copied from class:
net.janino.Java.BlockStatement
- Returns:
- false if this statement cannot complete normally (14.20)