NodeWithAccessModifiers<FieldDeclaration>, NodeWithFinalModifier<FieldDeclaration>, NodeWithPrivateModifier<FieldDeclaration>, NodeWithProtectedModifier<FieldDeclaration>, NodeWithPublicModifier<FieldDeclaration>, NodeWithStaticModifier<FieldDeclaration>, NodeWithAnnotations<FieldDeclaration>, NodeWithJavadoc<FieldDeclaration>, NodeWithModifiers<FieldDeclaration>, NodeWithRange<FieldDeclaration>, NodeWithTokenRange<FieldDeclaration>, NodeWithVariables<FieldDeclaration>, Observable, Visitable, HasParentNode<FieldDeclaration>, Cloneablepublic final class FieldDeclaration extends BodyDeclaration<FieldDeclaration> implements NodeWithJavadoc<FieldDeclaration>, NodeWithVariables<FieldDeclaration>, NodeWithAccessModifiers<FieldDeclaration>, NodeWithStaticModifier<FieldDeclaration>, NodeWithFinalModifier<FieldDeclaration>
class X { private static
int a=15*15; }Node.ObserverRegistrationMode, Node.ParsednessABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration| Constructor | Description |
|---|---|
FieldDeclaration() |
|
FieldDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<VariableDeclarator> variables) |
This constructor is used by the parser and is considered private.
|
FieldDeclaration(EnumSet<Modifier> modifiers,
VariableDeclarator variable) |
|
FieldDeclaration(EnumSet<Modifier> modifiers,
NodeList<VariableDeclarator> variables) |
|
FieldDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<VariableDeclarator> variables) |
|
FieldDeclaration(EnumSet<Modifier> modifiers,
Type type,
String name) |
Creates a
FieldDeclaration. |
| Modifier and Type | Method | Description |
|---|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg) |
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg) |
Accept method for visitor support.
|
FieldDeclaration |
clone() |
|
MethodDeclaration |
createGetter() |
Create a getter for this field, will only work if this field declares only 1 identifier and if this field is
already added to a ClassOrInterfaceDeclaration
|
MethodDeclaration |
createSetter() |
Create a setter for this field, will only work if this field declares only 1 identifier and if this field is
already added to a ClassOrInterfaceDeclaration
|
FieldDeclarationMetaModel |
getMetaModel() |
|
EnumSet<Modifier> |
getModifiers() |
Return the modifiers of this member declaration.
|
List<NodeList<?>> |
getNodeLists() |
The list of NodeLists owned by this node.
|
NodeList<VariableDeclarator> |
getVariables() |
|
boolean |
isTransient() |
|
boolean |
isVolatile() |
|
boolean |
remove(Node node) |
|
boolean |
replace(Node node,
Node replacementNode) |
|
FieldDeclaration |
setModifiers(EnumSet<Modifier> modifiers) |
|
FieldDeclaration |
setTransient(boolean set) |
|
FieldDeclaration |
setVariables(NodeList<VariableDeclarator> variables) |
|
FieldDeclaration |
setVolatile(boolean set) |
getAnnotations, setAnnotationsgetAncestorOfTypeaddOrphanComment, customInitialization, equals, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, toString, toString, tryAddImportToParentCompilationUnit, unregisteraddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitisFinal, setFinalgetComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocCommentaddModifier, removeModifier, setModifierisPrivate, setPrivateisProtected, setProtectedisPublic, setPubliccontainsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBeforeisStatic, setStaticaddVariable, calculateMaximumCommonType, getCommonType, getElementType, getMaximumCommonType, getVariable, setVariablepublic FieldDeclaration()
public FieldDeclaration(EnumSet<Modifier> modifiers, VariableDeclarator variable)
public FieldDeclaration(EnumSet<Modifier> modifiers, NodeList<VariableDeclarator> variables)
public FieldDeclaration(EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<VariableDeclarator> variables)
@Generated("com.github.javaparser.generator.core.node.MainConstructorGenerator") public FieldDeclaration(TokenRange tokenRange, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<VariableDeclarator> variables)
public FieldDeclaration(EnumSet<Modifier> modifiers, Type type, String name)
FieldDeclaration.modifiers - modifierstype - typename - field namepublic <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitable@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public EnumSet<Modifier> getModifiers()
getModifiers in interface NodeWithModifiers<FieldDeclaration>Modifier@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<VariableDeclarator> getVariables()
getVariables in interface NodeWithVariables<FieldDeclaration>@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public FieldDeclaration setModifiers(EnumSet<Modifier> modifiers)
setModifiers in interface NodeWithModifiers<FieldDeclaration>@Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public FieldDeclaration setVariables(NodeList<VariableDeclarator> variables)
setVariables in interface NodeWithVariables<FieldDeclaration>public MethodDeclaration createGetter()
MethodDeclaration createdIllegalStateException - if there is more than 1 variable identifier or if this field isn't attached to a
class or enumpublic MethodDeclaration createSetter()
MethodDeclaration createdIllegalStateException - if there is more than 1 variable identifier or if this field isn't attached to a
class or enumpublic boolean isTransient()
public boolean isVolatile()
public FieldDeclaration setTransient(boolean set)
public FieldDeclaration setVolatile(boolean set)
@Generated("com.github.javaparser.generator.core.node.GetNodeListsGenerator") public List<NodeList<?>> getNodeLists()
NodegetNodeLists in class BodyDeclaration<FieldDeclaration>@Generated("com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
remove in class BodyDeclaration<FieldDeclaration>@Generated("com.github.javaparser.generator.core.node.CloneGenerator") public FieldDeclaration clone()
clone in class BodyDeclaration<FieldDeclaration>@Generated("com.github.javaparser.generator.core.node.GetMetaModelGenerator") public FieldDeclarationMetaModel getMetaModel()
getMetaModel in class BodyDeclaration<FieldDeclaration>@Generated("com.github.javaparser.generator.core.node.ReplaceMethodGenerator") public boolean replace(Node node, Node replacementNode)
replace in class BodyDeclaration<FieldDeclaration>Copyright © 2007–2019. All rights reserved.