Package org.ek9lang.compiler.symbols
Class VariableSymbol
java.lang.Object
org.ek9lang.compiler.symbols.Symbol
org.ek9lang.compiler.symbols.VariableSymbol
- All Implemented Interfaces:
Serializable
,ISymbol
,ITokenReference
Models a variable.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ek9lang.compiler.symbols.ISymbol
ISymbol.SymbolCategory, ISymbol.SymbolGenus
-
Field Summary
Fields inherited from interface org.ek9lang.compiler.symbols.ISymbol
NOT_ASSIGNABLE
-
Constructor Summary
ConstructorDescriptionVariableSymbol
(String name) VariableSymbol
(String name, Optional<ISymbol> type) VariableSymbol
(String name, ISymbol type) VariableSymbol
(VariableSymbol toCopy) -
Method Summary
Modifier and TypeMethodDescriptionClone the symbol and re-parent if this symbol like a method should have a parent.protected VariableSymbol
cloneIntoVariable
(VariableSymbol newCopy) boolean
Provide the name an end user would need to see on the screen.int
hashCode()
boolean
boolean
boolean
Even constants can be mutable until set.boolean
boolean
boolean
isPublic()
boolean
void
setAggregatePropertyField
(boolean isAggregatePropertyField) void
setIncomingParameter
(boolean incomingParameter) void
setLoopVariable
(boolean asLoopVar) void
setPrivate
(boolean isPrivate) void
setReturningParameter
(boolean returningParameter) Methods inherited from class org.ek9lang.compiler.symbols.Symbol
clearInitialisedBy, cloneIntoSymbol, copySymbolProperties, getAssignableWeightTo, getAssignableWeightTo, getCategory, getFullyQualifiedName, getGenus, getInitialisedBy, getName, getParsedModule, getProduceFullyQualifiedName, getSourceToken, getSquirrelledData, getSymbolTypeAsString, getType, getUnCoercedAssignableWeightTo, isAssignableTo, isAssignableTo, isDevSource, isEk9Core, isExactSameType, isInjectionExpected, isLibSource, isMarkedPure, isNullAllowed, isPromotionSupported, isReferenced, putSquirrelledData, setCategory, setEk9Core, setGenus, setInitialisedBy, setInjectionExpected, setMarkedPure, setName, setNotMutable, setNullAllowed, setParsedModule, setProduceFullyQualifiedName, setReferenced, setSourceToken, setType, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ek9lang.compiler.symbols.ISymbol
isApplication, isConceptualTypeParameter, isConstant, isControl, isDeclaredAsConstant, isExtensionOfInjectable, isFromLiteral, isFunction, isGenericInNature, isInitialised, isInjectable, isMarkedAbstract, isMethod, isParameterisedType, isPrimitiveType, isProtected, isTemplateFunction, isTemplateType, isType, isVariable, setType
-
Constructor Details
-
VariableSymbol
-
VariableSymbol
-
VariableSymbol
-
VariableSymbol
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
clone
Description copied from interface:ISymbol
Clone the symbol and re-parent if this symbol like a method should have a parent. Other symbols like VariableSymbols are un-parented -
cloneIntoVariable
-
isPropertyField
public boolean isPropertyField() -
setAggregatePropertyField
public void setAggregatePropertyField(boolean isAggregatePropertyField) -
isPrivate
public boolean isPrivate() -
setPrivate
public void setPrivate(boolean isPrivate) -
isPublic
public boolean isPublic() -
isLoopVariable
public boolean isLoopVariable() -
setLoopVariable
public void setLoopVariable(boolean asLoopVar) -
isIncomingParameter
public boolean isIncomingParameter() -
setIncomingParameter
public void setIncomingParameter(boolean incomingParameter) -
isReturningParameter
public boolean isReturningParameter() -
setReturningParameter
public void setReturningParameter(boolean returningParameter) -
isMutable
public boolean isMutable()Description copied from interface:ISymbol
Even constants can be mutable until set. then they change to being none mutable. Likewise in 'pure' scopes a variable can be mutable until it is first set then none mutable. -
getFriendlyName
Description copied from interface:ISymbol
Provide the name an end user would need to see on the screen. Normally this is just 'getName' but in the case of Templates We use a very nasty internal naming for List of SomeClass - which will probably be something like _List_hashed_version_of_ComeClass and the end user needs to see 'List of SomeClass' for it to be meaningful.- Specified by:
getFriendlyName
in interfaceISymbol
- Overrides:
getFriendlyName
in classSymbol
- Returns:
- a user presentable of the symbol name.
-