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 |
BY_NAME_COMPARATOR
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 |
getExportName() |
String |
getFullName() |
JValueLiteral |
getLiteralInitializer() |
String |
getQualifiedExportName() |
String |
getSignature() |
boolean |
isCompileTimeConstant() |
boolean |
isExternal() |
boolean |
isStatic() |
boolean |
isThisRef() |
boolean |
isVolatile() |
void |
setExportName(String exportName) |
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, setType
getSourceInfo, setSourceInfo, toSource, toString
public static final JField NULL_FIELD
public JField(SourceInfo info, String name, JDeclaredType enclosingType, JType type, boolean isStatic, JField.Disposition disposition)
public void setExportName(String exportName)
public String getExportName()
public String getFullName()
public JDeclaredType getEnclosingType()
getEnclosingType
in interface HasEnclosingType
public JValueLiteral getLiteralInitializer()
public String getQualifiedExportName()
public String getSignature()
public boolean isCompileTimeConstant()
public boolean isExternal()
public boolean isStatic()
isStatic
in interface CanBeStatic
public boolean isThisRef()
public boolean isVolatile()
public void setFinal()
setFinal
in interface CanBeSetFinal
setFinal
in class JVariable
public void setInitializer(JDeclarationStatement declStmt)
setInitializer
in interface CanHaveInitializer
public void setVolatile()
public void traverse(JVisitor visitor, Context ctx)
JVisitable
traverse
in interface JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalprotected Object writeReplace()
Copyright © 2018. All rights reserved.