Package org.ek9lang.compiler.symbols
Class CallSymbol
java.lang.Object
org.ek9lang.compiler.symbols.Symbol
org.ek9lang.compiler.symbols.ScopedSymbol
org.ek9lang.compiler.symbols.MethodSymbol
org.ek9lang.compiler.symbols.CallSymbol
- All Implemented Interfaces:
Serializable
,IMayReturnSymbol
,IScope
,IScopedSymbol
,ISymbol
,ITokenReference
Just re-uses the bulk of method symbol for when we want to make a symbol that is a call
to an actual method.
This will be used to build up the sort of call we want to make based on the source .
We then have to resolve this CallSymbol against a real method symbol.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ek9lang.compiler.symbols.IScope
IScope.ScopeType
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
-
Method Summary
Modifier and TypeMethodDescriptionClone the symbol and re-parent if this symbol like a method should have a parent.protected CallSymbol
cloneIntoCallSymbol
(CallSymbol newCopy) boolean
Provide the name an end user would need to see on the screen.Useful for printing out errors and information.Provide a symbol that is returned from this method.int
hashCode()
boolean
boolean
Some methods have a named return symbol 'like rtn as String' for example.void
setFormOfDeclarationCall
(boolean formOfDeclarationCall) void
setResolvedSymbolToCall
(ScopedSymbol symbol) Set the actual method/function that should be called.Methods inherited from class org.ek9lang.compiler.symbols.MethodSymbol
clone, cloneIntoMethodSymbol, copyMethodProperties, doGetFriendlyName, getAccessModifier, getCallParameters, getParentScope, getUsedAsProxyForDelegate, isConstant, isConstructor, isEk9ReturnsThis, isExactSignatureMatchTo, isMarkedAbstract, isMarkedAsDispatcher, isMarkedNoClone, isNotConstructor, isNotMarkedAbstract, isOperator, isOverride, isParameterSignatureMatchTo, isPrivate, isProtected, isPublic, isSignatureMatchTo, isSynthetic, isUsedAsProxyForDelegate, justSetReturningSymbol, resolve, resolveInThisScopeOnly, setAccessModifier, setCallParameters, setConstructor, setEk9ReturnsThis, setMarkedAbstract, setMarkedAsDispatcher, setMarkedNoClone, setOperator, setOverride, setReturningSymbol, setSynthetic, setUsedAsProxyForDelegate, toString
Methods inherited from class org.ek9lang.compiler.symbols.ScopedSymbol
cloneIntoScopeSymbol, copyScopedSymbolProperties, define, findNearestDynamicBlockScopeInEnclosingScopes, findNearestNonBlockScopeInEnclosingScopes, getActualScope, getAllSymbolsMatchingName, getAnySuperTypeOrFunction, getEnclosingScope, getEncounteredExceptionToken, getOuterMostTypeOrFunction, getScopeName, getScopeType, getSymbolsForThisScope, isMarkedPure, isMutable, isNotMarkedPure, isScopeAMatchForEnclosingScope, isTerminatedNormally, resolveMatchingMethods, resolveMatchingMethodsInThisScopeOnly, resolveMember, resolveWithParentScope, setEncounteredExceptionToken, setMarkedPure, setOuterMostTypeOrFunction, setScopeType
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, isNullAllowed, isPromotionSupported, isReferenced, putSquirrelledData, setCategory, setEk9Core, setGenus, setInitialisedBy, setInjectionExpected, 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
clearInitialisedBy, getAssignableWeightTo, getAssignableWeightTo, getCategory, getFullyQualifiedName, getGenus, getInitialisedBy, getName, getParsedModule, getSourceToken, getSquirrelledData, getType, getUnCoercedAssignableWeightTo, isApplication, isAssignableTo, isAssignableTo, isConceptualTypeParameter, isControl, isDeclaredAsConstant, isDevSource, isEk9Core, isExactSameType, isExtensionOfInjectable, isFromLiteral, isFunction, isGenericInNature, isIncomingParameter, isInitialised, isInjectable, isInjectionExpected, isLibSource, isLoopVariable, isMethod, isNullAllowed, isParameterisedType, isPrimitiveType, isPromotionSupported, isPropertyField, isReferenced, isReturningParameter, isTemplateFunction, isTemplateType, isType, isVariable, putSquirrelledData, setGenus, setInitialisedBy, setInjectionExpected, setName, setNotMutable, setNullAllowed, setParsedModule, setReferenced, setType, setType
Methods inherited from interface org.ek9lang.compiler.symbols.ITokenReference
setSourceToken
-
Constructor Details
-
CallSymbol
-
-
Method Details
-
isFormOfDeclarationCall
public boolean isFormOfDeclarationCall() -
setFormOfDeclarationCall
public void setFormOfDeclarationCall(boolean formOfDeclarationCall) -
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- Specified by:
clone
in interfaceIScope
- Specified by:
clone
in interfaceIScopedSymbol
- Specified by:
clone
in interfaceISymbol
- Overrides:
clone
in classMethodSymbol
-
cloneIntoCallSymbol
-
getResolvedSymbolToCall
-
isReturningSymbolPresent
public boolean isReturningSymbolPresent()Description copied from class:MethodSymbol
Some methods have a named return symbol 'like rtn as String' for example. In other cases a method will not return anything (We use 'Void') in the case as the 'type'. So when a Returning Symbol is set we use the type of the returning variable as the type return on the method.- Specified by:
isReturningSymbolPresent
in interfaceIMayReturnSymbol
- Overrides:
isReturningSymbolPresent
in classMethodSymbol
-
getReturningSymbol
Description copied from class:MethodSymbol
Provide a symbol that is returned from this method. Note in EK9 this is not just a type but actually a variable symbol (that has a type).- Specified by:
getReturningSymbol
in interfaceIMayReturnSymbol
- Overrides:
getReturningSymbol
in classMethodSymbol
-
setResolvedSymbolToCall
Set the actual method/function that should be called. -
getFriendlyScopeName
Description copied from interface:IScope
Useful for printing out errors and information. The scope name might be a complex generated name used internally a bit like symbol names are. So some items are both scopes and symbols - so ideally we'd want to use a friendly name where possible.- Specified by:
getFriendlyScopeName
in interfaceIScope
- Overrides:
getFriendlyScopeName
in classScopedSymbol
- Returns:
- The friendly name to be used for the developer.
-
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 classMethodSymbol
- Returns:
- a user presentable of the symbol name.
-
equals
- Overrides:
equals
in classMethodSymbol
-
hashCode
public int hashCode()- Overrides:
hashCode
in classMethodSymbol
-