public class VarStatement extends Statement implements IVarStatement
var-statement var <identifier> [scope-attribute] [ : <type-expression> ] = <expression> var <identifier> [scope-attribute] : <type-expression> [ = <expression> ]
IGosuParser| Type | Property and Description |
|---|---|
boolean |
has |
| Modifier and Type | Field and Description |
|---|---|
protected Expression |
_expression |
protected boolean |
_hasProperty |
protected ModifierInfo |
_modifiers |
protected TypeLiteral |
_typeLiteral |
VOID_RETURN_VALUE_tokens, UNDEF_FILE, UNDEF_FUNCTION, UNDEF_MODULE| Constructor and Description |
|---|
VarStatement() |
execute, getExcludedReturnTypeElements, getLeastSignificant, getLeastSignificantTerminalStatement, getReturnType, hasContent, isNoOp, setParentaddExceptionsFrom, addParseException, addParseException, addParseException, addParseExceptions, addParseIssues, addParseWarning, addParseWarning, addParseWarnings, addToken, adjustColumn, adjustLineNum, assignTokens, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, compactParseTree, findAncestorParsedElementByType, findDeclaringStatement, findLineNumberOfDeclaration, findRootParsedElement, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getEnclosingFeatureInfo, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getQualifyingEnclosingTypeInfo, getTokens, hasImmediateParseIssue, hasImmediateParseWarning, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, initEmptyParseTree, initLocation, isCompileTimeConstant, isSuppressed, isSuppressed, isSynthetic, makeDoubleValue, makeFloatValue, makeInteger, makeLong, removeParseException, removeParseWarning, removeParseWarningRecursively, setGosuProgram, setLineNum, setLocation, setSynthetic, shouldClearParseInfoclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexecute, getLeastSignificantTerminalStatement, hasContentaddExceptionsFrom, addParseException, addParseException, addParseWarning, addParseWarning, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, findAncestorParsedElementByType, findDeclaringStatement, findRootParsedElement, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getReturnType, getTokens, hasImmediateParseIssue, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, isCompileTimeConstant, isSuppressed, isSynthetic, setLocation, setParentpublic boolean hasProperty
hasProperty in interface IVarStatementprotected Expression _expression
protected TypeLiteral _typeLiteral
protected boolean _hasProperty
protected ModifierInfo _modifiers
public String getIdentifierName()
getIdentifierName in interface IVarStatementpublic ISymbol getSymbol()
getSymbol in interface IVarStatementpublic void setSymbol(ISymbol symbol)
setSymbol in interface IVarStatementpublic String getPropertyName()
getPropertyName in interface IVarStatementpublic void setPropertyName(String strPropertyName)
public TypeLiteral getTypeLiteral()
getTypeLiteral in interface IVarStatementpublic void setTypeLiteral(TypeLiteral typeLiteral)
public Expression getAsExpression()
getAsExpression in interface IVarStatementpublic void setAsExpression(Expression expression)
public void setType(IType newType)
public boolean hasProperty()
hasProperty in interface IVarStatementpublic void setHasProperty(boolean hasProperty)
public ModifierInfo getModifierInfo()
getModifierInfo in interface IVarStatementpublic void setModifierInfo(ModifierInfo modifiers)
public int getModifiers()
getModifiers in interface IVarStatementpublic boolean isStatic()
isStatic in interface IVarStatementpublic void setStatic(boolean bStatic)
public boolean isPrivate()
isPrivate in interface IVarStatementpublic void setPrivate(boolean bPrivate)
public boolean isInternal()
isInternal in interface IVarStatementpublic void setInternal(boolean bInternal)
public boolean isProtected()
isProtected in interface IVarStatementpublic void setProtected(boolean bProtected)
public boolean isPublic()
isPublic in interface IVarStatementpublic void setPublic(boolean bPublic)
public boolean isFinal()
isFinal in interface IVarStatementpublic void setFinal(boolean bFinal)
public boolean isEnumConstant()
isEnumConstant in interface IVarStatementpublic void setEnumConstant(boolean bEnumConstant)
public boolean isTransient()
public IType getType()
getType in interface IVarStatementgetType in interface IHasTypepublic void setScriptPart(IScriptPartId partId)
public IScriptPartId getScriptPart()
getScriptPart in interface IVarStatementpublic Object execute()
execute in interface IStatementexecute in class Statementprotected ITerminalStatement getLeastSignificantTerminalStatement_internal(boolean[] bAbsolute)
getLeastSignificantTerminalStatement_internal in class Statementpublic String toString()
Statementpublic String getFunctionName()
getFunctionName in interface IParsedElementgetFunctionName in class ParsedElementpublic int getNameOffset(String identifierName)
getNameOffset in interface IParsedElementWithAtLeastOneDeclarationpublic void setNameOffset(int iOffset,
String identifierName)
setNameOffset in interface IParsedElementWithAtLeastOneDeclarationpublic boolean declares(String identifierName)
declares in interface IParsedElementWithAtLeastOneDeclarationpublic String[] getDeclarations()
getDeclarations in interface IParsedElementWithAtLeastOneDeclarationpublic List<IGosuAnnotation> getAnnotations()
getAnnotations in class ParsedElementpublic String getFullDescription()
getFullDescription in interface IVarStatementpublic void clearDefn()
public boolean isDefinitionParsed()
public void setDefinitionParsed(boolean bParsed)
public boolean getHasInitializer()
getHasInitializer in interface IVarStatementpublic boolean isImplicitlyUsed()
public int getPropertyNameOffset()
getPropertyNameOffset in interface IVarStatementpublic boolean isFieldDeclaration()
isFieldDeclaration in interface IVarStatementpublic void setIsInitializedTopLevelProgVar()
Copyright © 2017. All rights reserved.