|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.services.ServiceArgument<T>
T - the type of the argumentpublic class ServiceArgument<T>
Describes an argument passed to services
| Field Summary | |
|---|---|
protected java.lang.String |
alias
the alias of the argument |
protected boolean |
constant
field indicates constant argument |
protected java.lang.String |
name
the name of the argument |
protected java.lang.Class<T> |
type
type of the argument |
protected T |
value
value of the argument |
| Constructor Summary | |
|---|---|
protected |
ServiceArgument(java.lang.Class<T> type,
T value)
Constructs a service argument with specified type and value |
protected |
ServiceArgument(java.lang.Class<T> type,
T value,
boolean constant)
Constructs a service argument with specified type and value |
| Method Summary | ||
|---|---|---|
static
|
createArgument(java.lang.String name,
T value)
Returns a service argument based on value |
|
static
|
createArgument(T value)
Returns a service argument based on value |
|
static
|
createArgumentAs(java.lang.String name,
T value,
java.lang.Class<T> type)
Returns a service argument based on value and type |
|
static
|
createArgumentAs(T value,
java.lang.Class<T> type)
Returns a service argument based on value and type |
|
static ServiceArgument<?> |
createConstantFromString(java.lang.String value,
java.lang.Class<?> argumentClass)
Creates a ServiceArgument constant based on string value and argument type. |
|
java.lang.String |
getAlias()
Returns the argument alias. |
|
java.lang.String |
getName()
Returns the name of the argument |
|
java.lang.Class<T> |
getType()
Returns the argument type |
|
T |
getValue()
Returns the argument value |
|
boolean |
isValid()
Returns true if service argument is valid |
|
void |
setAlias(java.lang.String alias)
Sets the argument alias. |
|
void |
setName(java.lang.String name)
Sets the name of the argument |
|
void |
setType(java.lang.Class<T> argumentType)
Sets the class of the argument |
|
void |
setValue(T value)
Sets the service argument value |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Class<T> type
protected T value
protected final boolean constant
protected java.lang.String name
protected java.lang.String alias
| Constructor Detail |
|---|
protected ServiceArgument(java.lang.Class<T> type,
T value)
type - the argument typevalue - the argument value
protected ServiceArgument(java.lang.Class<T> type,
T value,
boolean constant)
type - the argument typevalue - the argument valueconstant - the constant flag| Method Detail |
|---|
public static <T> ServiceArgument<T> createArgument(T value)
T - the argument typevalue - the argument value
public static <T> ServiceArgument<T> createArgument(java.lang.String name,
T value)
T - the argument typename - argument namevalue - the argument value
public static <T> ServiceArgument<T> createArgumentAs(T value,
java.lang.Class<T> type)
T - the argument typevalue - the argument valuetype - the argument type
public static <T> ServiceArgument<T> createArgumentAs(java.lang.String name,
T value,
java.lang.Class<T> type)
T - the argument typename - the argument namevalue - the argument valuetype - the argument type
public java.lang.Class<T> getType()
public void setType(java.lang.Class<T> argumentType)
argumentType - the argument classpublic T getValue()
public void setValue(T value)
value - the new valuepublic boolean isValid()
true if service argument is valid
true if service argument is validpublic java.lang.String getName()
public void setName(java.lang.String name)
name - the new argument namepublic java.lang.String getAlias()
null if no alias setpublic void setAlias(java.lang.String alias)
alias - the new aliaspublic java.lang.String toString()
toString in class java.lang.Object
public static ServiceArgument<?> createConstantFromString(java.lang.String value,
java.lang.Class<?> argumentClass)
ServiceArgument constant based on string value and argument type.String, Integer, Long, Double, Float and Boolean
value - the string valueargumentClass - the requested service argument type
ServiceArgument instance based on value and class, or null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||