Class ComponentTypeSymbol
java.lang.Object
de.monticore.symbols.compsymbols._symboltable.ComponentTypeSymbolTOP
de.monticore.symbols.compsymbols._symboltable.ComponentTypeSymbol
- All Implemented Interfaces:
ICommonCompSymbolsSymbol,de.monticore.symboltable.IScopeSpanningSymbol,de.monticore.symboltable.ISymbol
- Direct Known Subclasses:
ComponentTypeSymbolSurrogateTOP
-
Field Summary
Fields inherited from class de.monticore.symbols.compsymbols._symboltable.ComponentTypeSymbolTOP
accessModifier, astNode, enclosingScope, fullName, name, numOptParams, packageName, parameter, refinements, spannedScope, stereoinfo, superComponents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddParameter(@NonNull VariableSymbol parameter) Returns all incoming ports of this component, including inherited ports.Returns all outgoing ports of this component, including inherited ports.Return all ports of this component, including inherited ports.getAllPorts(boolean incoming, boolean outgoing) Returns the ports of this component with matching direction.protected Set<PortSymbol> getAllPorts(Collection<ComponentTypeSymbol> visited) Searches the fields of this component type for a field with the given name.getIncomingPort(@NonNull String name) Returns the incoming port of this component that matches the given name, if it exists.getIncomingPort(@NonNull String name, boolean searchSuper) Returns the incoming port with matching name of this component, if it exists.Returns the incoming ports of this component.getOutgoingPort(@NonNull String name) Returns the outgoing port of this component that matches the given name, if it exists.getOutgoingPort(@NonNull String name, boolean searchSuper) Returns the outgoing port of this component that matches the given name, if it exists.Returns the outgoing ports of this component.getParameter(@NonNull String name) Returns the port of this component that matches the given name, if it exists.Returns the port of this component that matches the given name, if it exists.getPorts(boolean incoming, boolean outgoing) Returns the ports of this component with matching direction.Helper function that transitively determines the start of the refinement chain.getSubcomponents(@NonNull String name) Returns the subcomponent with matching name of this component, if it exists.booleanbooleanhasPorts()booleanbooleanisAtomic()booleanMethods inherited from class de.monticore.symbols.compsymbols._symboltable.ComponentTypeSymbolTOP
accept, accept, accept, accept, accept, accept, addAllParameter, addAllParameter, addAllRefinements, addAllRefinements, addAllSuperComponents, addAllSuperComponents, addParameter, addRefinements, addRefinements, addSuperComponents, addSuperComponents, clearParameter, clearRefinements, clearSuperComponents, containsAllParameter, containsAllRefinements, containsAllSuperComponents, containsParameter, containsRefinements, containsSuperComponents, determineFullName, determinePackageName, equals, equalsParameter, equalsRefinements, equalsSuperComponents, forEachParameter, forEachRefinements, forEachSuperComponents, getAccessModifier, getAstNode, getEnclosingScope, getFullName, getName, getNumOptParams, getPackageName, getParameter, getParameterList, getPorts, getRefinements, getRefinementsList, getSpannedScope, getStereoinfo, getSubcomponents, getSuperComponents, getSuperComponentsList, getThis, getTypeParameters, hashCodeParameter, hashCodeRefinements, hashCodeSuperComponents, indexOfParameter, indexOfRefinements, indexOfSuperComponents, isEmptyParameter, isEmptyRefinements, isEmptySuperComponents, isPresentAstNode, iteratorParameter, iteratorRefinements, iteratorSuperComponents, lastIndexOfParameter, lastIndexOfRefinements, lastIndexOfSuperComponents, listIteratorParameter, listIteratorParameter, listIteratorRefinements, listIteratorRefinements, listIteratorSuperComponents, listIteratorSuperComponents, parallelStreamParameter, parallelStreamRefinements, parallelStreamSuperComponents, removeAllParameter, removeAllRefinements, removeAllSuperComponents, removeIfParameter, removeIfRefinements, removeIfSuperComponents, removeParameter, removeParameter, removeRefinements, removeRefinements, removeSuperComponents, removeSuperComponents, replaceAllParameter, replaceAllRefinements, replaceAllSuperComponents, retainAllParameter, retainAllRefinements, retainAllSuperComponents, setAccessModifier, setAstNode, setAstNodeAbsent, setEnclosingScope, setFullName, setName, setNumOptParams, setPackageName, setParameter, setParameterList, setRefinements, setRefinementsList, setSpannedScope, setStereoinfo, setSuperComponents, setSuperComponentsList, sizeParameter, sizeRefinements, sizeSuperComponents, sortParameter, sortRefinements, sortSuperComponents, spliteratorParameter, spliteratorRefinements, spliteratorSuperComponents, streamParameter, streamRefinements, streamSuperComponents, subListParameter, subListRefinements, subListSuperComponents, toArrayParameter, toArrayParameter, toArrayRefinements, toArrayRefinements, toArraySuperComponents, toArraySuperComponents, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.monticore.symboltable.ISymbol
getSourcePosition
-
Constructor Details
-
ComponentTypeSymbol
-
-
Method Details
-
getParameter
-
addParameter
- Overrides:
addParameterin classComponentTypeSymbolTOP
-
hasParameters
public boolean hasParameters() -
hasTypeParameter
public boolean hasTypeParameter() -
getPort
Returns the port of this component that matches the given name, if it exists. Does not consider inherited ports.- Parameters:
name- the name of the port- Returns:
- the port with the given name wrapped in an
Optionalor an emptyOptionalif no such port exists
-
getPort
Returns the port of this component that matches the given name, if it exists. Does consider inherited ports ifsearchSuperis set to true.- Parameters:
name- the name of the portsearchSuper- whether to consider ports of super components- Returns:
- the port with the given name wrapped in an
Optionalor an emptyOptionalif no such port exists.
-
getIncomingPorts
Returns the incoming ports of this component. Does not include inherited ports.- Returns:
- a
Listof incoming ports of this component
-
getIncomingPort
Returns the incoming port of this component that matches the given name, if it exists. Does not consider inherited ports.- Parameters:
name- the name of the port- Returns:
- the incoming port with the given name wrapped in an
Optionalor an emptyOptionalif no such port exists.
-
getIncomingPort
Returns the incoming port with matching name of this component, if it exists. Does consider inherited ports ifsearchSuperis set to true.- Parameters:
name- the name of the portsearchSuper- whether to consider ports of super components- Returns:
- the incoming port with the given name wrapped in an
Optionalor an emptyOptionalif no such port exists
-
getOutgoingPorts
Returns the outgoing ports of this component. Does not include inherited ports.- Returns:
- a
Listof the outgoing ports of this component
-
getOutgoingPort
Returns the outgoing port of this component that matches the given name, if it exists. Does not consider inherited ports.- Parameters:
name- the name of the port- Returns:
- the outgoing port with the given name wrapped in an
Optionalor an emptyOptionalif no such port exists.
-
getOutgoingPort
Returns the outgoing port of this component that matches the given name, if it exists. Does consider inherited ports ifsearchSuperis set to true.- Parameters:
name- the name of the portsearchSuper- whether to consider ports of super components- Returns:
- the outgoing port with the given name wrapped in an
Optionalor an emptyOptionalif no such port exists
-
getPorts
Returns the ports of this component with matching direction. Does not included inherited ports.- Parameters:
incoming- whether to included incoming portsoutgoing- whether to included outgoing ports- Returns:
- a
Listof all ports of this component the given direction
-
getAllPorts
Return all ports of this component, including inherited ports.- Returns:
- a
Setof all ports of this component
-
getAllPorts
-
getAllIncomingPorts
Returns all incoming ports of this component, including inherited ports.- Returns:
- a
Setof all incoming ports of this component
-
getAllOutgoingPorts
Returns all outgoing ports of this component, including inherited ports.- Returns:
- a
Setof all outgoing ports of this component
-
getAllPorts
Returns the ports of this component with matching direction. Does included inherited ports.- Parameters:
incoming- whether to included incoming portsoutgoing- whether to included outgoing ports- Returns:
- a
Setof all ports of this component with the given direction
-
hasPorts
public boolean hasPorts() -
getSubcomponents
Returns the subcomponent with matching name of this component, if it exists.- Parameters:
name- the name of the subcomponent- Returns:
- the subcomponent with the given name wrapped in an
Optionalor an emptyOptionalif no such subcomponent exists.
-
isDecomposed
public boolean isDecomposed() -
isAtomic
public boolean isAtomic() -
getRefinementStart
Helper function that transitively determines the start of the refinement chain.
Example: A refines B, C; B refines D; C refines D; The unique start is D.
A component without explicit refinements is itself the start on the chain. If there does not exist an unique start (A refines B, C and B, C are unrefined) we throw an error.
-
getFields
- Returns:
- a
Listof the fields of this component type.
-
getField
Searches the fields of this component type for a field with the given name. Returns anOptionalof a field of this component type with the given name, or an emptyOptionalif no such field exists. Throws anIllegalArgumentExceptionif the given name isnull.- Parameters:
name- the name of the field.- Returns:
- an
Optionalof a field of this component type with the given name, or an emptyOptionalif no such field exists.
-