Package org.ek9lang.compiler.symbols
Class ConstantSymbol
java.lang.Object
org.ek9lang.compiler.symbols.Symbol
org.ek9lang.compiler.symbols.ConstantSymbol
- All Implemented Interfaces:
Serializable
,ISymbol
,ITokenReference
A very simple type that holds a single distinct value.
For example PI = 3.242 would be a constant.
- 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
ConstructorDescriptionConstantSymbol
(String name) ConstantSymbol
(String name, boolean fromLiteral) ConstantSymbol
(String name, Optional<ISymbol> type) ConstantSymbol
(String name, Optional<ISymbol> type, boolean fromLiteral) Construction of a Constant.ConstantSymbol
(String name, ISymbol type) ConstantSymbol
(String name, ISymbol type, boolean fromLiteral) -
Method Summary
Modifier and TypeMethodDescriptionClone the symbol and re-parent if this symbol like a method should have a parent.protected ConstantSymbol
cloneIntoConstant
(ConstantSymbol newCopy) boolean
int
hashCode()
boolean
boolean
toString()
Methods inherited from class org.ek9lang.compiler.symbols.Symbol
clearInitialisedBy, cloneIntoSymbol, copySymbolProperties, getAssignableWeightTo, getAssignableWeightTo, getCategory, getFriendlyName, getFullyQualifiedName, getGenus, getInitialisedBy, getName, getParsedModule, getProduceFullyQualifiedName, getSourceToken, getSquirrelledData, getSymbolTypeAsString, getType, getUnCoercedAssignableWeightTo, isAssignableTo, isAssignableTo, isDevSource, isEk9Core, isExactSameType, isInjectionExpected, isLibSource, isMarkedPure, isMutable, isNullAllowed, isPromotionSupported, isReferenced, putSquirrelledData, setCategory, setEk9Core, setGenus, setInitialisedBy, setInjectionExpected, setMarkedPure, setName, setNotMutable, setNullAllowed, setParsedModule, setProduceFullyQualifiedName, setReferenced, setSourceToken, setType
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, isControl, isDeclaredAsConstant, isExtensionOfInjectable, isFunction, isGenericInNature, isIncomingParameter, isInitialised, isInjectable, isLoopVariable, isMarkedAbstract, isMethod, isParameterisedType, isPrimitiveType, isPrivate, isPropertyField, isProtected, isPublic, isReturningParameter, isTemplateFunction, isTemplateType, isType, isVariable, setType
-
Constructor Details
-
ConstantSymbol
-
ConstantSymbol
-
ConstantSymbol
-
ConstantSymbol
-
ConstantSymbol
-
ConstantSymbol
Construction of a Constant.
-
-
Method Details
-
isFromLiteral
public boolean isFromLiteral() -
isConstant
public boolean isConstant() -
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 -
cloneIntoConstant
-
equals
-
hashCode
public int hashCode() -
toString
-