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, traverse
setInitializer
protected JDeclarationStatement declStmt
public JLiteral getConstInitializer()
getConstInitializer
in interface CanHaveInitializer
public JDeclarationStatement getDeclarationStatement()
public JExpression getInitializer()
public abstract JVariableRef makeRef(SourceInfo sourceInfo)
public JType getType()
HasType
public boolean hasInitializer()
hasInitializer
in interface CanHaveInitializer
public boolean isFinal()
isFinal
in interface CanBeFinal
public void setFinal()
setFinal
in interface CanBeSetFinal
public void setName(String name)
public void setType(JType newType)
public Set<String> getSuppressedWarnings()
getSuppressedWarnings
in interface CanHaveSuppressedWarnings
public void setSuppressedWarnings(Set<String> suppressedWarnings)
setSuppressedWarnings
in interface CanHaveSuppressedWarnings
Copyright © 2018. All rights reserved.