edu.wpi.ebob.model
Class Parameter
java.lang.Object
edu.wpi.ebob.model.Parameter
public class Parameter
- extends java.lang.Object
Represents an input parameter for a method or constructor, or the input value
for a field.
- Author:
- Liam Morley
Constructor Summary |
Parameter(IClass returnType)
Constructs a new Parameter with the given return type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
returnType
private IClass returnType
input
private java.lang.String input
scanner
private Scanner scanner
tokens
private java.util.Collection tokens
result
private IObject result
Parameter
public Parameter(IClass returnType)
- Constructs a new Parameter with the given return type.
setInput
public void setInput(java.lang.String input)
- sets the value of this parameter to the user-input string.
getReturnType
public IClass getReturnType()
- Returns:
- Returns the returnType.
getInput
public java.lang.String getInput()
evaluate
public IObject evaluate()
throws ParserException
- evaluates the user input to an IObject.
- Returns:
- an IObject if the input string is valid.
- Throws:
java.lang.IllegalStateException
- if the input has not yet been set.
ParserException
- if the input string is invalid
java.lang.ClassCastException
- if the input string does not resolve to an instance of
returnType or any of its superclasses