public static final class Java.FieldDeclaration extends Java.Statement implements Java.Annotatable, Java.DocCommentable, Java.FieldDeclarationOrInitializer
| Modifier and Type | Field and Description |
|---|---|
Java.Modifier[] |
modifiers
The modifiers of this field declaration.
|
Java.Type |
type
The type of this field.
|
Java.VariableDeclarator[] |
variableDeclarators
The declarators of this field declaration, e.g.
|
localVariablesNOWHERE| Constructor and Description |
|---|
FieldDeclaration(Location location,
String docComment,
Java.Modifier[] modifiers,
Java.Type type,
Java.VariableDeclarator[] variableDeclarators) |
| Modifier and Type | Method and Description |
|---|---|
<R,EX extends Throwable> |
accept(Visitor.BlockStatementVisitor<R,EX> visitor)
Invokes the "
visit...()" method of Visitor.BlockStatementVisitor for the concrete
Java.BlockStatement type. |
<R,EX extends Throwable> |
accept(Visitor.FieldDeclarationOrInitializerVisitor<R,EX> visitor) |
<R,EX extends Throwable> |
accept(Visitor.TypeBodyDeclarationVisitor<R,EX> visitor)
Invokes the "
visit...()" method of Visitor.TypeBodyDeclarationVisitor for the concrete
Java.TypeBodyDeclaration type. |
Access |
getAccess() |
Java.Annotation[] |
getAnnotations() |
Java.TypeDeclaration |
getDeclaringType() |
String |
getDocComment() |
Java.Modifier[] |
getModifiers() |
boolean |
hasDeprecatedDocTag()
Returns
true if the object has a doc comment and the @deprecated tag appears in the doc
comment. |
boolean |
isFinal() |
boolean |
isPrivate() |
boolean |
isStatic() |
boolean |
isTransient() |
boolean |
isVolatile() |
void |
setDeclaringType(Java.TypeDeclaration declaringType)
Sets the type declaration that this declaration belongs to.
|
void |
setEnclosingScope(Java.Scope enclosingScope)
Sets the enclosing scope of this
Java.BlockStatement. |
String |
toString() |
findLocalVariable, getEnclosingScopegetLocation, throwCompileExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindLocalVariable, getEnclosingScopegetLocation, throwCompileExceptionpublic final Java.Modifier[] modifiers
public final Java.Type type
public final Java.VariableDeclarator[] variableDeclarators
public FieldDeclaration(Location location, @Nullable String docComment, Java.Modifier[] modifiers, Java.Type type, Java.VariableDeclarator[] variableDeclarators)
public void setDeclaringType(Java.TypeDeclaration declaringType)
Java.TypeBodyDeclarationsetDeclaringType in interface Java.TypeBodyDeclarationpublic Java.TypeDeclaration getDeclaringType()
getDeclaringType in interface Java.TypeBodyDeclarationpublic void setEnclosingScope(Java.Scope enclosingScope)
Java.BlockStatementJava.BlockStatement.setEnclosingScope in interface Java.BlockStatementsetEnclosingScope in class Java.Statementpublic Java.Modifier[] getModifiers()
getModifiers in interface Java.TypeBodyDeclarationJava.Modifiers of this declaration@Nullable public <R,EX extends Throwable> R accept(Visitor.FieldDeclarationOrInitializerVisitor<R,EX> visitor) throws EX extends Throwable
accept in interface Java.FieldDeclarationOrInitializerEX extends Throwable@Nullable public <R,EX extends Throwable> R accept(Visitor.TypeBodyDeclarationVisitor<R,EX> visitor) throws EX extends Throwable
Java.TypeBodyDeclarationvisit...()" method of Visitor.TypeBodyDeclarationVisitor for the concrete
Java.TypeBodyDeclaration type.accept in interface Java.TypeBodyDeclarationEX extends Throwable@Nullable public <R,EX extends Throwable> R accept(Visitor.BlockStatementVisitor<R,EX> visitor) throws EX extends Throwable
Java.BlockStatementvisit...()" method of Visitor.BlockStatementVisitor for the concrete
Java.BlockStatement type.accept in interface Java.BlockStatementEX extends Throwable@Nullable public String getDocComment()
getDocComment in interface Java.DocCommentablenullpublic boolean hasDeprecatedDocTag()
Java.DocCommentabletrue if the object has a doc comment and the @deprecated tag appears in the doc
comment.hasDeprecatedDocTag in interface Java.DocCommentablepublic Access getAccess()
public Java.Annotation[] getAnnotations()
getAnnotations in interface Java.AnnotatableJava.TypeDeclaration, Java.FieldDeclaration, Java.MethodDeclarator
or Java.ConstructorDeclaratorpublic boolean isFinal()
public boolean isPrivate()
public boolean isStatic()
public boolean isTransient()
public boolean isVolatile()
Copyright © 2022. All rights reserved.