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
Fields Modifier and Type Field Description Java.ModifiersAndAnnotationsmodifiersAndAnnotationsJava.TypetypeJava.VariableDeclarator[]variableDeclarators-
Fields inherited from class org.codehaus.janino.Java.Statement
localVariables
-
Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
-
-
Constructor Summary
Constructors Constructor Description FieldDeclaration(Location location, java.lang.String optionalDocComment, Java.ModifiersAndAnnotations modifiersAndAnnotations, Java.Type type, Java.VariableDeclarator[] variableDeclarators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor.BlockStatementVisitor visitor)voidaccept(Visitor.TypeBodyDeclarationVisitor visitor)Java.TypeDeclarationgetDeclaringType()java.lang.StringgetDocComment()Returns the doc comment of the object ornull.booleanhasDeprecatedDocTag()Returnstrueif the object has a doc comment and the@deprecatedtag appears in the doc comment.booleanisStatic()voidsetDeclaringType(Java.TypeDeclaration declaringType)java.lang.StringtoString()-
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 Detail
-
modifiersAndAnnotations
public final Java.ModifiersAndAnnotations modifiersAndAnnotations
-
type
public final Java.Type type
-
variableDeclarators
public final Java.VariableDeclarator[] variableDeclarators
-
-
Constructor Detail
-
FieldDeclaration
public FieldDeclaration(Location location, java.lang.String optionalDocComment, Java.ModifiersAndAnnotations modifiersAndAnnotations, Java.Type type, Java.VariableDeclarator[] variableDeclarators)
-
-
Method Detail
-
setDeclaringType
public void setDeclaringType(Java.TypeDeclaration declaringType)
- Specified by:
setDeclaringTypein interfaceJava.TypeBodyDeclaration
-
getDeclaringType
public Java.TypeDeclaration getDeclaringType()
- Specified by:
getDeclaringTypein interfaceJava.TypeBodyDeclaration
-
isStatic
public boolean isStatic()
- Specified by:
isStaticin interfaceJava.TypeBodyDeclaration
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
accept
public void accept(Visitor.TypeBodyDeclarationVisitor visitor)
- Specified by:
acceptin interfaceJava.TypeBodyDeclaration
-
accept
public void accept(Visitor.BlockStatementVisitor visitor)
- Specified by:
acceptin interfaceJava.BlockStatement
-
getDocComment
public java.lang.String getDocComment()
Description copied from interface:Java.DocCommentableReturns the doc comment of the object ornull.- Specified by:
getDocCommentin interfaceJava.DocCommentable
-
hasDeprecatedDocTag
public boolean hasDeprecatedDocTag()
Description copied from interface:Java.DocCommentableReturnstrueif the object has a doc comment and the@deprecatedtag appears in the doc comment.- Specified by:
hasDeprecatedDocTagin interfaceJava.DocCommentable
-
-