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
ConstructorsConstructorDescriptionMethodSymbolSearch(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 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:SymbolSearchSet any parameters that might be needed as part of this search.- Overrides:
setTypeParametersin classSymbolSearch
-
addTypeParameter
Description copied from class:SymbolSearchAdd a type parameter to the search.- Overrides:
addTypeParameterin classSymbolSearch
-
addTypeParameter
Description copied from class:SymbolSearchAdd 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:
addTypeParameterin classSymbolSearch
-
setOfTypeOrReturn
Description copied from class:SymbolSearchWhat type of symbol is being searched for or its return type.- Overrides:
setOfTypeOrReturnin classSymbolSearch
-
setOfTypeOrReturn
- Overrides:
setOfTypeOrReturnin classSymbolSearch
-