Package org.ek9lang.compiler.symbols
Interface IAggregateSymbol
- All Superinterfaces:
ICanBeGeneric
,IScope
,IScopedSymbol
,ISymbol
,ITokenReference
,Serializable
- All Known Implementing Classes:
AggregateSymbol
,AggregateWithTraitsSymbol
Interface for an aggregate, typically a class or something like that.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
used to add back pointers to subclasses.Clone the symbol and re-parent if this symbol like a method should have a parent.Get all methods marked as abstract in this or any supers.Get all methods in this scope only that are abstract.default List
<AggregateWithTraitsSymbol> All methods abstract and non-abstract in this scope.Get all methods on this and any supers or traits.Get all methods not marked as abstract in this or any supers.Get all methods in this scope only that are not abstract.Get all operators on this and any supers or traits.A list of all the defined constructors.getName()
Name of this aggregate.Just access to the properties in this aggregate - no supers.What sort of scope is this aggregate.To get a full hierarchy you will need to get these subclasses and then get the subclasses of those.default List
<IAggregateSymbol> default boolean
boolean
isImplementingInSomeWay
(IAggregateSymbol aggregate) Only really used by aggregates that can have one or more traits.boolean
isInAggregateHierarchy
(IAggregateSymbol theAggregateToCheck) boolean
Is this aggregate a dispatcher or just a normal class component whatever.resolveMatchingMethods
(MethodSymbolSearch search, MethodSymbolSearchResult result) Resolve for matching methods and add matches to result.resolveMember
(SymbolSearch search) Just try and resolve a member in this or super scopes.void
setSuperAggregate
(Optional<IAggregateSymbol> superAggregate) void
setSuperAggregate
(IAggregateSymbol superAggregateSymbol) Methods inherited from interface org.ek9lang.compiler.symbols.ICanBeGeneric
addGenericSymbolReference, addTypeParameterOrArgument, getAnyConceptualTypeParameters, getGenericSymbolReferences, getGenericType, getTypeParameterOrArguments, isOpenForExtension
Methods inherited from interface org.ek9lang.compiler.symbols.IScope
define, findNearestDynamicBlockScopeInEnclosingScopes, findNearestNonBlockScopeInEnclosingScopes, getAllSymbolsMatchingName, getEnclosingScope, getEncounteredExceptionToken, getFriendlyScopeName, getScopeName, getSymbolsForThisScope, isMarkedPure, isScopeAMatchForEnclosingScope, isTerminatedNormally, resolve, resolveInThisScopeOnly, resolveMatchingMethodsInThisScopeOnly, setEncounteredExceptionToken
Methods inherited from interface org.ek9lang.compiler.symbols.ISymbol
clearInitialisedBy, getAssignableWeightTo, getAssignableWeightTo, getCategory, getFriendlyName, getFullyQualifiedName, getGenus, getInitialisedBy, getParsedModule, getSourceToken, getSquirrelledData, getType, getUnCoercedAssignableWeightTo, isApplication, isAssignableTo, isAssignableTo, isConceptualTypeParameter, isConstant, isControl, isDeclaredAsConstant, isDevSource, isEk9Core, isExactSameType, isExtensionOfInjectable, isFromLiteral, isFunction, isGenericInNature, isIncomingParameter, isInitialised, isInjectable, isInjectionExpected, isLibSource, isLoopVariable, isMarkedAbstract, isMarkedPure, isMethod, isMutable, isNullAllowed, isParameterisedType, isPrimitiveType, isPrivate, isPromotionSupported, isPropertyField, isProtected, isPublic, 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
-
Method Details
-
getScopeType
IScope.ScopeType getScopeType()What sort of scope is this aggregate.- Specified by:
getScopeType
in interfaceIScope
-
isMarkedAsDispatcher
boolean isMarkedAsDispatcher()Is this aggregate a dispatcher or just a normal class component whatever.- Returns:
- true if marked as a dispatcher.
-
getPipeSinkType
-
getSubAggregateSymbols
List<IAggregateSymbol> getSubAggregateSymbols()To get a full hierarchy you will need to get these subclasses and then get the subclasses of those.- Returns:
- a list of all the subclasses of this class
-
addSubAggregateSymbol
used to add back pointers to subclasses.- Parameters:
sub
- The sub-class to point back to.
-
getAllMethods
List<MethodSymbol> getAllMethods()Get all methods on this and any supers or traits.- Returns:
- the list
-
getAllOperators
List<MethodSymbol> getAllOperators()Get all operators on this and any supers or traits.- Returns:
- the list
-
getAllAbstractMethods
List<MethodSymbol> getAllAbstractMethods()Get all methods marked as abstract in this or any supers.- Returns:
- The list.
-
getAllNonAbstractMethods
List<MethodSymbol> getAllNonAbstractMethods()Get all methods not marked as abstract in this or any supers.- Returns:
- The list.
-
getConstructors
List<MethodSymbol> getConstructors()A list of all the defined constructors.- Returns:
- The list of constructors
-
getAllMethodInThisScopeOnly
List<MethodSymbol> getAllMethodInThisScopeOnly()All methods abstract and non-abstract in this scope. -
getAllNonAbstractMethodsInThisScopeOnly
List<MethodSymbol> getAllNonAbstractMethodsInThisScopeOnly()Get all methods in this scope only that are not abstract.- Returns:
- The list
-
getAllAbstractMethodsInThisScopeOnly
List<MethodSymbol> getAllAbstractMethodsInThisScopeOnly()Get all methods in this scope only that are abstract.- Returns:
- The list
-
getProperties
Just access to the properties in this aggregate - no supers.- Returns:
- The list
-
getName
String getName()Name of this aggregate. -
resolveMatchingMethods
MethodSymbolSearchResult resolveMatchingMethods(MethodSymbolSearch search, MethodSymbolSearchResult result) Resolve for matching methods and add matches to result. Idea is to be able to gather all these up and ensure only one single good result i.e. matching methods does exist and one single method matches best. Else ambiguity or no match.- Specified by:
resolveMatchingMethods
in interfaceIScope
-
resolveMember
Just try and resolve a member in this or super scopes.- Specified by:
resolveMember
in interfaceIScope
-
getSuperAggregate
Optional<IAggregateSymbol> getSuperAggregate() -
setSuperAggregate
-
setSuperAggregate
-
isInAggregateHierarchy
-
getTraits
-
getAllExtensionConstrainedTraits
-
getAllTraits
List<AggregateWithTraitsSymbol> getAllTraits() -
isExtensionConstrained
default boolean isExtensionConstrained() -
isImplementingInSomeWay
Only really used by aggregates that can have one or more traits. But also super classes or super traits. So can either be implementing directly, super, super - super or traits and supe traits. -
getAggregateDescription
String getAggregateDescription() -
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
-