public class JField extends JVariable implements CanBeStatic, HasEnclosingType
| Modifier and Type | Class and Description |
|---|---|
static class |
JField.Disposition
Determines whether the variable is final, volatile, or neither.
|
HasName.Util| Modifier and Type | Field and Description |
|---|---|
static JField |
NULL_FIELD |
| Constructor and Description |
|---|
JField(SourceInfo info,
String name,
JDeclaredType enclosingType,
JType type,
boolean isStatic,
JField.Disposition disposition) |
| Modifier and Type | Method and Description |
|---|---|
JDeclaredType |
getEnclosingType() |
String |
getFullName() |
JValueLiteral |
getLiteralInitializer() |
String |
getSignature() |
boolean |
isCompileTimeConstant() |
boolean |
isExternal() |
boolean |
isStatic() |
boolean |
isThisRef() |
boolean |
isVolatile() |
void |
setFinal() |
void |
setInitializer(JDeclarationStatement declStmt) |
void |
setVolatile() |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
protected Object |
writeReplace() |
getConstInitializer, getDeclarationStatement, getInitializer, getName, getType, hasInitializer, isFinal, setName, setTypegetSourceInfo, setSourceInfo, toSource, toStringpublic static final JField NULL_FIELD
public JField(SourceInfo info, String name, JDeclaredType enclosingType, JType type, boolean isStatic, JField.Disposition disposition)
public String getFullName()
public JDeclaredType getEnclosingType()
getEnclosingType in interface HasEnclosingTypepublic JValueLiteral getLiteralInitializer()
public String getSignature()
public boolean isCompileTimeConstant()
public boolean isExternal()
public boolean isStatic()
isStatic in interface CanBeStaticpublic boolean isThisRef()
public boolean isVolatile()
public void setFinal()
setFinal in interface CanBeSetFinalsetFinal in class JVariablepublic void setInitializer(JDeclarationStatement declStmt)
setInitializer in interface CanHaveInitializerpublic void setVolatile()
public void traverse(JVisitor visitor, Context ctx)
JVisitabletraverse in interface JVisitablevisitor - the visitor that should traverse this nodectx - the context of an existing traversalprotected Object writeReplace()
Copyright © 2018. All rights reserved.