cz.cuni.amis.pogamut.sposh.executor
Class ParamInfo

Package class diagram package ParamInfo
java.lang.Object
  extended by cz.cuni.amis.pogamut.sposh.executor.ParamInfo
All Implemented Interfaces:
Comparable<ParamInfo>

public class ParamInfo
extends Object
implements Comparable<ParamInfo>

Object for storing information about one parameter of a parametrized primitive. The class is immutable and can be sorted according to the name of the parameter.

Author:
Honza
See Also:
Parametrized action, Parametrized sense

Nested Class Summary
static class ParamInfo.Type
          Enum of all possible types allowed as the parameters of methods in a parametrized primitive.
 
Field Summary
 String clsName
          The class of the parameter.
 String name
          Name of the parameter, i.e. the string in the Param annotation.
 ParamInfo.Type type
          Type of parameter.
 
Constructor Summary
ParamInfo(String name, ParamInfo.Type type, String clsName)
          Create new info object about parameter of a parametrized method.
 
Method Summary
 int compareTo(ParamInfo o)
           
 boolean isValueAssignable(Object value)
          Is passed value assignable to the parameter?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public final String name
Name of the parameter, i.e. the string in the Param annotation.


type

public final ParamInfo.Type type
Type of parameter.


clsName

public final String clsName
The class of the parameter.

Constructor Detail

ParamInfo

public ParamInfo(String name,
                 ParamInfo.Type type,
                 String clsName)
Create new info object about parameter of a parametrized method.

Parameters:
name - Name of a parameter (from {@link Param) annotation.
type - Type of parameter that is being accepted.
clsName - Class of the parameter, but as string, not the actual class, e.g. "java.lang.String"
Method Detail

compareTo

public int compareTo(ParamInfo o)
Specified by:
compareTo in interface Comparable<ParamInfo>

isValueAssignable

public boolean isValueAssignable(Object value)
Is passed value assignable to the parameter? This method is not called during runtime.

Parameters:
value - See ParamInfo.Type for list, e.g. instance of String, EnumValue, int, Integer, Double,...
Returns:
True if value can be assigned to specified type.


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.