Interface CodeLocalVariable
- All Superinterfaces:
CodeAssignment, CodeAtomicStatement, CodeExpression, CodeItem, CodeItemWithDeclaration, CodeItemWithModifiers, CodeItemWithName, CodeItemWithType, CodeItemWithVariables, CodeStatement, CodeVariable
CodeVariable that is locally defined in a CodeBlock.Syntax:
[final] «type» «name» [ = «expression»]
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Field Summary
Fields inherited from interface CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Method Summary
Modifier and TypeMethodDescriptiondefault CodeModifiersdefault CodeLocalVariablebooleanisFinal()Methods inherited from interface CodeExpression
evaluateMethods inherited from interface CodeItem
getLanguage, getSourceCode, write, write, write, write, write, writeMethods inherited from interface CodeItemWithDeclaration
writeReferenceMethods inherited from interface CodeItemWithName
getNameMethods inherited from interface CodeItemWithType
getTypeMethods inherited from interface CodeItemWithVariables
getVariableMethods inherited from interface CodeVariable
writeReference
-
Method Details
-
isFinal
boolean isFinal()- Returns:
- true if
final.
-
getVariable
- Specified by:
getVariablein interfaceCodeAssignment- Returns:
- the
CodeVariablethat is to be assigned.
-
getExpression
CodeExpression getExpression()- Specified by:
getExpressionin interfaceCodeAssignment- Returns:
- the optional
CodeExpressionused to initialize this variable. May benullfor no initialization.
-
getModifiers
- Specified by:
getModifiersin interfaceCodeItemWithModifiers- Returns:
- the
CodeModifiersof this element.
-