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, ISymbolNature, 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 IScope
IScope.ScopeType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClone the symbol and re-parent if this symbol like a method should have a parent.protected CallSymbolcloneIntoCallSymbol(CallSymbol newCopy) booleanProvide 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.inthashCode()booleanbooleanSome methods have a named return symbol 'like rtn as String' for example.voidsetFormOfDeclarationCall(boolean formOfDeclarationCall) voidsetResolvedSymbolToCall(ScopedSymbol symbol) Set the actual method/function that should be called.Methods inherited from class MethodSymbol
clone, cloneIntoMethodSymbol, copyMethodProperties, doGetFriendlyName, getAccessModifier, getCallParameters, getParentScope, getUsedAsProxyForDelegate, isConstant, isConstructor, isEk9ReturnsThis, isExactSignatureMatchTo, isMarkedAbstract, isMarkedAsDispatcher, isMarkedNoClone, isNotConstructor, isNotMarkedAbstract, isNotOperator, isOperator, isOverride, isParameterSignatureMatchTo, isPrivate, isProtected, isPublic, isSignatureMatchTo, isSynthetic, isUsedAsProxyForDelegate, justSetReturningSymbol, resolve, resolveInThisScopeOnly, setAccessModifier, setCallParameters, setConstructor, setEk9ReturnsThis, setMarkedAbstract, setMarkedAsDispatcher, setMarkedNoClone, setOperator, setOverride, setReturningSymbol, setSynthetic, setUsedAsProxyForDelegate, toStringMethods inherited from class 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, setScopeTypeMethods inherited from class Symbol
clearInitialisedBy, cloneIntoSymbol, copySymbolProperties, getAssignableCostTo, getAssignableCostTo, getCategory, getFullyQualifiedName, getGenus, getInitialisedBy, getName, getParsedModule, getProduceFullyQualifiedName, getSourceToken, getSquirrelledData, getSymbolTypeAsString, getType, getUnCoercedAssignableCostTo, isAssignableTo, isAssignableTo, isDevSource, isEk9Core, isExactSameType, isInjectionExpected, isLibSource, isNullAllowed, isPromotionSupported, isReferenced, putSquirrelledData, setCategory, setEk9Core, setGenus, setInitialisedBy, setInjectionExpected, setName, setNotMutable, setNullAllowed, setParsedModule, setProduceFullyQualifiedName, setReferenced, setSourceToken, setTypeMethods inherited from interface ISymbol
clearInitialisedBy, getAssignableCostTo, getAssignableCostTo, getFullyQualifiedName, getInitialisedBy, getName, getParsedModule, getSourceToken, getSquirrelledData, getType, getUnCoercedAssignableCostTo, isAssignableTo, isAssignableTo, isDeclaredAsConstant, isDevSource, isExactSameType, isExtensionOfInjectable, isFromLiteral, isIncomingParameter, isInitialised, isInjectable, isInjectionExpected, isLibSource, isLoopVariable, isNullAllowed, isPromotionSupported, isPropertyField, isReferenced, isReturningParameter, putSquirrelledData, setInitialisedBy, setInjectionExpected, setName, setNotMutable, setNullAllowed, setParsedModule, setReferenced, setType, setTypeMethods inherited from interface ISymbolNature
getCategory, getGenus, isApplication, isConceptualTypeParameter, isControl, isEk9Core, isFunction, isGenericInNature, isMethod, isParameterisedType, isPrimitiveType, isTemplateFunction, isTemplateType, isType, isVariable, setGenusMethods inherited from interface ITokenReference
setSourceToken
-
Constructor Details
-
CallSymbol
-
-
Method Details
-
isFormOfDeclarationCall
public boolean isFormOfDeclarationCall() -
setFormOfDeclarationCall
public void setFormOfDeclarationCall(boolean formOfDeclarationCall) -
clone
Description copied from interface:ISymbolClone the symbol and re-parent if this symbol like a method should have a parent. Other symbols like VariableSymbols are un-parented- Specified by:
clonein interfaceIScope- Specified by:
clonein interfaceIScopedSymbol- Specified by:
clonein interfaceISymbol- Overrides:
clonein classMethodSymbol
-
cloneIntoCallSymbol
-
getResolvedSymbolToCall
-
setResolvedSymbolToCall
Set the actual method/function that should be called. -
isReturningSymbolPresent
public boolean isReturningSymbolPresent()Description copied from class:MethodSymbolSome 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:
isReturningSymbolPresentin interfaceIMayReturnSymbol- Overrides:
isReturningSymbolPresentin classMethodSymbol
-
getReturningSymbol
Description copied from class:MethodSymbolProvide 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:
getReturningSymbolin interfaceIMayReturnSymbol- Overrides:
getReturningSymbolin classMethodSymbol
-
getFriendlyScopeName
Description copied from interface:IScopeUseful 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:
getFriendlyScopeNamein interfaceIScope- Overrides:
getFriendlyScopeNamein classScopedSymbol- Returns:
- The friendly name to be used for the developer.
-
getFriendlyName
Description copied from interface:ISymbolProvide 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:
getFriendlyNamein interfaceISymbol- Overrides:
getFriendlyNamein classMethodSymbol- Returns:
- a user presentable of the symbol name.
-
equals
- Overrides:
equalsin classMethodSymbol
-
hashCode
public int hashCode()- Overrides:
hashCodein classMethodSymbol
-