Package jadex.commons
Class SimpleParameterGuesser
- java.lang.Object
-
- jadex.commons.SimpleParameterGuesser
-
- All Implemented Interfaces:
IParameterGuesser
public class SimpleParameterGuesser extends java.lang.Object implements IParameterGuesser
Guess parameter based on type.
-
-
Field Summary
Fields Modifier and Type Field Description protected IParameterGuesser
parent
The parent.protected java.util.Collection<?>
values
The values.
-
Constructor Summary
Constructors Constructor Description SimpleParameterGuesser(IParameterGuesser parent)
Create a new guesser.SimpleParameterGuesser(IParameterGuesser parent, java.util.Collection<?> values)
Create a new guesser.SimpleParameterGuesser(java.util.Collection<?> values)
Create a new guesser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IParameterGuesser
getParent()
Get the parent guesser.java.lang.Object
guessParameter(java.lang.Class<?> type, boolean exact)
Guess a parameter.void
setParent(IParameterGuesser parent)
Set the parent.
-
-
-
Field Detail
-
parent
protected IParameterGuesser parent
The parent.
-
values
protected java.util.Collection<?> values
The values.
-
-
Constructor Detail
-
SimpleParameterGuesser
public SimpleParameterGuesser(IParameterGuesser parent)
Create a new guesser.
-
SimpleParameterGuesser
public SimpleParameterGuesser(java.util.Collection<?> values)
Create a new guesser.
-
SimpleParameterGuesser
public SimpleParameterGuesser(IParameterGuesser parent, java.util.Collection<?> values)
Create a new guesser.
-
-
Method Detail
-
guessParameter
public java.lang.Object guessParameter(java.lang.Class<?> type, boolean exact)
Guess a parameter.- Specified by:
guessParameter
in interfaceIParameterGuesser
- Parameters:
type
- The type.exact
- Test with exact- Returns:
- The mapped value.
-
getParent
public IParameterGuesser getParent()
Get the parent guesser.- Returns:
- The parent guesser.
-
setParent
public void setParent(IParameterGuesser parent)
Set the parent.- Parameters:
parent
- The parent.
-
-