
public abstract class JVariable extends JNode implements CanBeSetFinal, CanHaveInitializer, HasName, HasType, CanHaveSuppressedWarnings
HasName.Util| Modifier and Type | Field and Description |
|---|---|
protected JDeclarationStatement |
declStmt |
BY_NAME_COMPARATOR| Modifier and Type | Method and Description |
|---|---|
JLiteral |
getConstInitializer() |
JDeclarationStatement |
getDeclarationStatement() |
JExpression |
getInitializer() |
String |
getName() |
Set<String> |
getSuppressedWarnings() |
JType |
getType()
Returns the type of this expression.
|
boolean |
hasInitializer() |
boolean |
isFinal() |
abstract JVariableRef |
makeRef(SourceInfo sourceInfo) |
void |
setFinal() |
void |
setName(String name) |
void |
setSuppressedWarnings(Set<String> suppressedWarnings) |
void |
setType(JType newType) |
getSourceInfo, setSourceInfo, toSource, toString, traversesetInitializerprotected JDeclarationStatement declStmt
public JLiteral getConstInitializer()
getConstInitializer in interface CanHaveInitializerpublic JDeclarationStatement getDeclarationStatement()
public JExpression getInitializer()
public abstract JVariableRef makeRef(SourceInfo sourceInfo)
public JType getType()
HasTypepublic boolean hasInitializer()
hasInitializer in interface CanHaveInitializerpublic boolean isFinal()
isFinal in interface CanBeFinalpublic void setFinal()
setFinal in interface CanBeSetFinalpublic void setName(String name)
public void setType(JType newType)
public Set<String> getSuppressedWarnings()
getSuppressedWarnings in interface CanHaveSuppressedWarningspublic void setSuppressedWarnings(Set<String> suppressedWarnings)
setSuppressedWarnings in interface CanHaveSuppressedWarningsCopyright © 2018. All rights reserved.