Package org.codehaus.janino
Class Java.FieldDeclaration
java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.Statement
org.codehaus.janino.Java.FieldDeclaration
- All Implemented Interfaces:
Java.BlockStatement
,Java.DocCommentable
,Java.Locatable
,Java.Scope
,Java.TypeBodyDeclaration
- Enclosing class:
Java
public static final class Java.FieldDeclaration
extends Java.Statement
implements Java.TypeBodyDeclaration, Java.DocCommentable
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.
-
Field Summary
FieldsFields inherited from class org.codehaus.janino.Java.Statement
localVariables
Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
-
Constructor Summary
ConstructorsConstructorDescriptionFieldDeclaration
(Location location, String optionalDocComment, Java.ModifiersAndAnnotations modifiersAndAnnotations, Java.Type type, Java.VariableDeclarator[] variableDeclarators) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(Visitor.BlockStatementVisitor visitor) void
accept
(Visitor.TypeBodyDeclarationVisitor visitor) Returns the doc comment of the object ornull
.boolean
Returnstrue
if the object has a doc comment and the@deprecated
tag appears in the doc comment.boolean
isStatic()
void
setDeclaringType
(Java.TypeDeclaration declaringType) toString()
Methods inherited from class org.codehaus.janino.Java.Statement
findLocalVariable, getEnclosingScope, setEnclosingScope
Methods inherited from class org.codehaus.janino.Java.Located
getLocation, throwCompileException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.codehaus.janino.Java.Locatable
getLocation, throwCompileException
-
Field Details
-
modifiersAndAnnotations
-
type
-
variableDeclarators
-
-
Constructor Details
-
FieldDeclaration
public FieldDeclaration(Location location, String optionalDocComment, Java.ModifiersAndAnnotations modifiersAndAnnotations, Java.Type type, Java.VariableDeclarator[] variableDeclarators)
-
-
Method Details
-
setDeclaringType
- Specified by:
setDeclaringType
in interfaceJava.TypeBodyDeclaration
-
getDeclaringType
- Specified by:
getDeclaringType
in interfaceJava.TypeBodyDeclaration
-
isStatic
public boolean isStatic()- Specified by:
isStatic
in interfaceJava.TypeBodyDeclaration
-
toString
-
accept
- Specified by:
accept
in interfaceJava.TypeBodyDeclaration
-
accept
- Specified by:
accept
in interfaceJava.BlockStatement
-
getDocComment
Description copied from interface:Java.DocCommentable
Returns the doc comment of the object ornull
.- Specified by:
getDocComment
in interfaceJava.DocCommentable
-
hasDeprecatedDocTag
public boolean hasDeprecatedDocTag()Description copied from interface:Java.DocCommentable
Returnstrue
if the object has a doc comment and the@deprecated
tag appears in the doc comment.- Specified by:
hasDeprecatedDocTag
in interfaceJava.DocCommentable
-