Package org.ek9lang.compiler.search
Class MethodSymbolSearch
java.lang.Object
org.ek9lang.compiler.search.SymbolSearch
org.ek9lang.compiler.search.MethodSymbolSearch
Quite a few option to a method search.
In some cases you need to be exact but in others you
want the return type left open.
So there are multiple constructors to support this.
-
Constructor Summary
ConstructorDescriptionMethodSymbolSearch
(String name) MethodSymbolSearch
(String name, Optional<ISymbol> ofTypeOrReturn) MethodSymbolSearch
(String newName, SymbolSearch from) Create a method search from an existing search, but with a new name.MethodSymbolSearch
(String name, ISymbol ofTypeOrReturn) MethodSymbolSearch
(String newName, MethodSymbol methodSymbol) Create a method search given a method symbol, but used a new method name.§ But this does not set the expected type.MethodSymbolSearch
(MethodSymbol methodSymbol) Create a method search given a method symbol. -
Method Summary
Modifier and TypeMethodDescriptionaddTypeParameter
(Optional<ISymbol> parameter) Add a type parameter to the search.addTypeParameter
(ISymbol parameter) Add a parameter to the search parameters.setOfTypeOrReturn
(Optional<ISymbol> ofTypeOrReturn) What type of symbol is being searched for or its return type.setOfTypeOrReturn
(ISymbol ofTypeOrReturn) setTypeParameters
(List<ISymbol> typeParameters) Set any parameters that might be needed as part of this search.Methods inherited from class org.ek9lang.compiler.search.SymbolSearch
cloneIntoSearchSymbol, getAsSymbol, getName, getOfTypeOrReturn, getSearchType, getTypeParameters, getValidSearchTypes, isAnyValidTypeSearch, isCategoryAcceptable, isLimitToBlocks, setExampleSymbolToMatch, setLimitToBlocks, setSearchType, setVetoSearchTypes, toString
-
Constructor Details
-
MethodSymbolSearch
-
MethodSymbolSearch
Create a method search from an existing search, but with a new name. -
MethodSymbolSearch
Create a method search given a method symbol. But this does not set the expected type. This is very useful for finding overridden methods where the returning type is different but compatible. -
MethodSymbolSearch
Create a method search given a method symbol, but used a new method name.§ But this does not set the expected type. This is very useful for finding overridden methods where the returning type is different but compatible. -
MethodSymbolSearch
-
MethodSymbolSearch
-
MethodSymbolSearch
-
-
Method Details
-
setTypeParameters
Description copied from class:SymbolSearch
Set any parameters that might be needed as part of this search.- Overrides:
setTypeParameters
in classSymbolSearch
-
addTypeParameter
Description copied from class:SymbolSearch
Add a type parameter to the search.- Overrides:
addTypeParameter
in classSymbolSearch
-
addTypeParameter
Description copied from class:SymbolSearch
Add a parameter to the search parameters. This is the 'type' symbol - i.e. Integer or whatever. It is not a variable that 'has' a type.- Overrides:
addTypeParameter
in classSymbolSearch
-
setOfTypeOrReturn
Description copied from class:SymbolSearch
What type of symbol is being searched for or its return type.- Overrides:
setOfTypeOrReturn
in classSymbolSearch
-
setOfTypeOrReturn
- Overrides:
setOfTypeOrReturn
in classSymbolSearch
-