Package com.aspectran.core.util.apon
Class ParameterValue
- java.lang.Object
-
- com.aspectran.core.util.apon.ParameterValue
-
-
Constructor Summary
Constructors Modifier Constructor Description ParameterValue(java.lang.String name, ValueType valueType)
ParameterValue(java.lang.String name, ValueType valueType, boolean array)
ParameterValue(java.lang.String name, ValueType valueType, boolean array, boolean noBracket)
protected
ParameterValue(java.lang.String name, ValueType valueType, boolean array, boolean noBracket, boolean valueTypeFixed)
ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass)
ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array)
ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket)
protected
ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket, boolean valueTypeFixed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
arraylize()
Change parameter type to array type.void
clearValue()
Clears the parameter value.int
getArraySize()
Returns the size of the array if the value is an array.Parameters
getContainer()
Returns theParameters
that contains theParameter
.java.lang.String
getName()
Returns the parameter name.java.lang.String
getQualifiedName()
Returns the fully qualified parameter name.java.lang.Object
getValue()
Returns a value as anObject
.java.lang.Boolean
getValueAsBoolean()
Returns a value as aBoolean
.java.lang.Boolean[]
getValueAsBooleanArray()
Returns a value as aBoolean
array.java.util.List<java.lang.Boolean>
getValueAsBooleanList()
Returns a value as aList<Boolean>
.java.lang.Double
getValueAsDouble()
Returns a value as aDouble
.java.lang.Double[]
getValueAsDoubleArray()
Returns a value as aDouble
array.java.util.List<java.lang.Double>
getValueAsDoubleList()
Returns a value as aList<Double>
.java.lang.Float
getValueAsFloat()
Returns a value as aFloat
.java.lang.Float[]
getValueAsFloatArray()
Returns a value as aFloat
array.java.util.List<java.lang.Float>
getValueAsFloatList()
Returns a value as aList<Float>
.java.lang.Integer
getValueAsInt()
Returns a value as anInteger
.java.lang.Integer[]
getValueAsIntArray()
Returns a value as anInteger
array.java.util.List<java.lang.Integer>
getValueAsIntList()
Returns a value as aList<Integer>
.java.lang.Long
getValueAsLong()
Returns a value as aLong
.java.lang.Long[]
getValueAsLongArray()
Returns a value as aLong
array.java.util.List<java.lang.Long>
getValueAsLongList()
Returns a value as aList<Long>
.Parameters
getValueAsParameters()
Returns a value as aParameters
.Parameters[]
getValueAsParametersArray()
Returns a value as aParameters
array.java.util.List<Parameters>
getValueAsParametersList()
Returns a value as aList<Parameters>
.java.lang.String
getValueAsString()
Returns a value as aString
.java.lang.String[]
getValueAsStringArray()
Returns a value as aString
array.java.util.List<java.lang.String>
getValueAsStringList()
Returns a value as aList<String>
.java.util.List<?>
getValueList()
Returns a value as aList
.java.lang.Object[]
getValues()
Returns a value as anObject
array.ValueType
getValueType()
Returns the parameter value type.boolean
hasValue()
Returns whether a non-null value has been assigned.boolean
isArray()
Returns whether the parameter value is an array.boolean
isAssigned()
Returns whether a parameter has been assigned a value.boolean
isBracketed()
Returns whether the value of the array is represented using square brackets.boolean
isValueTypeFixed()
Returns whether this is a predefined parameter.boolean
isValueTypeHinted()
Returns whether the value type is hinted.<T extends Parameters>
TnewParameters(Parameter identifier)
Creates a new instance ofParameters
with the specified identifierParameter
.void
putValue(java.lang.Object value)
Puts the parameter value.void
setBracketed(boolean bracketed)
void
setContainer(Parameters container)
void
setValueType(ValueType valueType)
Sets the parameter value type.void
setValueTypeHinted(boolean valueTypeHinted)
Sets whether the value type is hinted.java.lang.String
toString()
-
-
-
Constructor Detail
-
ParameterValue
public ParameterValue(java.lang.String name, ValueType valueType)
-
ParameterValue
public ParameterValue(java.lang.String name, ValueType valueType, boolean array)
-
ParameterValue
public ParameterValue(java.lang.String name, ValueType valueType, boolean array, boolean noBracket)
-
ParameterValue
protected ParameterValue(java.lang.String name, ValueType valueType, boolean array, boolean noBracket, boolean valueTypeFixed)
-
ParameterValue
public ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass)
-
ParameterValue
public ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array)
-
ParameterValue
public ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket)
-
ParameterValue
protected ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket, boolean valueTypeFixed)
-
-
Method Detail
-
getContainer
public Parameters getContainer()
Description copied from interface:Parameter
Returns theParameters
that contains theParameter
.- Specified by:
getContainer
in interfaceParameter
- Returns:
- the
Parameters
-
setContainer
public void setContainer(Parameters container)
-
getName
public java.lang.String getName()
Description copied from interface:Parameter
Returns the parameter name.
-
getQualifiedName
public java.lang.String getQualifiedName()
Description copied from interface:Parameter
Returns the fully qualified parameter name.- Specified by:
getQualifiedName
in interfaceParameter
- Returns:
- the qualified name
-
getValueType
public ValueType getValueType()
Description copied from interface:Parameter
Returns the parameter value type.- Specified by:
getValueType
in interfaceParameter
- Returns:
- the parameter value type
-
setValueType
public void setValueType(ValueType valueType)
Description copied from interface:Parameter
Sets the parameter value type.- Specified by:
setValueType
in interfaceParameter
- Parameters:
valueType
- the parameter value type
-
isValueTypeFixed
public boolean isValueTypeFixed()
Description copied from interface:Parameter
Returns whether this is a predefined parameter.- Specified by:
isValueTypeFixed
in interfaceParameter
- Returns:
true
if this is a predefined parameter, otherwisefalse
-
isValueTypeHinted
public boolean isValueTypeHinted()
Description copied from interface:Parameter
Returns whether the value type is hinted.- Specified by:
isValueTypeHinted
in interfaceParameter
- Returns:
- true if the value type is hinted; false otherwise
-
setValueTypeHinted
public void setValueTypeHinted(boolean valueTypeHinted)
Description copied from interface:Parameter
Sets whether the value type is hinted.- Specified by:
setValueTypeHinted
in interfaceParameter
- Parameters:
valueTypeHinted
- true if the value type is hinted; false otherwise
-
isArray
public boolean isArray()
Description copied from interface:Parameter
Returns whether the parameter value is an array.
-
isBracketed
public boolean isBracketed()
Description copied from interface:Parameter
Returns whether the value of the array is represented using square brackets.- Specified by:
isBracketed
in interfaceParameter
- Returns:
true
if the value of the array is represented using square brackets, otherwisefalse
-
setBracketed
public void setBracketed(boolean bracketed)
-
isAssigned
public boolean isAssigned()
Description copied from interface:Parameter
Returns whether a parameter has been assigned a value. Even if a null is assigned, it is valid.- Specified by:
isAssigned
in interfaceParameter
- Returns:
true
if a parameter has been assigned a value, otherwisefalse
-
hasValue
public boolean hasValue()
Description copied from interface:Parameter
Returns whether a non-null value has been assigned.
-
getArraySize
public int getArraySize()
Description copied from interface:Parameter
Returns the size of the array if the value is an array.- Specified by:
getArraySize
in interfaceParameter
- Returns:
- the size of the array
-
arraylize
public void arraylize()
Description copied from interface:Parameter
Change parameter type to array type.
-
putValue
public void putValue(java.lang.Object value)
Description copied from interface:Parameter
Puts the parameter value.
-
clearValue
public void clearValue()
Description copied from interface:Parameter
Clears the parameter value.- Specified by:
clearValue
in interfaceParameter
-
getValue
public java.lang.Object getValue()
Description copied from interface:Parameter
Returns a value as anObject
.
-
getValueList
public java.util.List<?> getValueList()
Description copied from interface:Parameter
Returns a value as aList
.- Specified by:
getValueList
in interfaceParameter
- Returns:
- a
List
-
getValues
public java.lang.Object[] getValues()
Description copied from interface:Parameter
Returns a value as anObject
array.
-
getValueAsString
public java.lang.String getValueAsString()
Description copied from interface:Parameter
Returns a value as aString
.- Specified by:
getValueAsString
in interfaceParameter
- Returns:
- a
String
-
getValueAsStringArray
public java.lang.String[] getValueAsStringArray()
Description copied from interface:Parameter
Returns a value as aString
array.- Specified by:
getValueAsStringArray
in interfaceParameter
- Returns:
- a
String
array
-
getValueAsStringList
public java.util.List<java.lang.String> getValueAsStringList()
Description copied from interface:Parameter
Returns a value as aList<String>
.- Specified by:
getValueAsStringList
in interfaceParameter
- Returns:
- a
List<String>
-
getValueAsInt
public java.lang.Integer getValueAsInt()
Description copied from interface:Parameter
Returns a value as anInteger
.- Specified by:
getValueAsInt
in interfaceParameter
- Returns:
- an
Integer
-
getValueAsIntArray
public java.lang.Integer[] getValueAsIntArray()
Description copied from interface:Parameter
Returns a value as anInteger
array.- Specified by:
getValueAsIntArray
in interfaceParameter
- Returns:
- an
Integer
array
-
getValueAsIntList
public java.util.List<java.lang.Integer> getValueAsIntList()
Description copied from interface:Parameter
Returns a value as aList<Integer>
.- Specified by:
getValueAsIntList
in interfaceParameter
- Returns:
- a
List<Integer>
-
getValueAsLong
public java.lang.Long getValueAsLong()
Description copied from interface:Parameter
Returns a value as aLong
.- Specified by:
getValueAsLong
in interfaceParameter
- Returns:
- a
Long
-
getValueAsLongArray
public java.lang.Long[] getValueAsLongArray()
Description copied from interface:Parameter
Returns a value as aLong
array.- Specified by:
getValueAsLongArray
in interfaceParameter
- Returns:
- a
Long
array
-
getValueAsLongList
public java.util.List<java.lang.Long> getValueAsLongList()
Description copied from interface:Parameter
Returns a value as aList<Long>
.- Specified by:
getValueAsLongList
in interfaceParameter
- Returns:
- a
List<Long>
-
getValueAsFloat
public java.lang.Float getValueAsFloat()
Description copied from interface:Parameter
Returns a value as aFloat
.- Specified by:
getValueAsFloat
in interfaceParameter
- Returns:
- a
Float
-
getValueAsFloatArray
public java.lang.Float[] getValueAsFloatArray()
Description copied from interface:Parameter
Returns a value as aFloat
array.- Specified by:
getValueAsFloatArray
in interfaceParameter
- Returns:
- a
Float
array
-
getValueAsFloatList
public java.util.List<java.lang.Float> getValueAsFloatList()
Description copied from interface:Parameter
Returns a value as aList<Float>
.- Specified by:
getValueAsFloatList
in interfaceParameter
- Returns:
- a
List<Float>
-
getValueAsDouble
public java.lang.Double getValueAsDouble()
Description copied from interface:Parameter
Returns a value as aDouble
.- Specified by:
getValueAsDouble
in interfaceParameter
- Returns:
- a
Double
-
getValueAsDoubleArray
public java.lang.Double[] getValueAsDoubleArray()
Description copied from interface:Parameter
Returns a value as aDouble
array.- Specified by:
getValueAsDoubleArray
in interfaceParameter
- Returns:
- a
Double
array
-
getValueAsDoubleList
public java.util.List<java.lang.Double> getValueAsDoubleList()
Description copied from interface:Parameter
Returns a value as aList<Double>
.- Specified by:
getValueAsDoubleList
in interfaceParameter
- Returns:
- a
List<Double>
-
getValueAsBoolean
public java.lang.Boolean getValueAsBoolean()
Description copied from interface:Parameter
Returns a value as aBoolean
.- Specified by:
getValueAsBoolean
in interfaceParameter
- Returns:
- a
Boolean
-
getValueAsBooleanArray
public java.lang.Boolean[] getValueAsBooleanArray()
Description copied from interface:Parameter
Returns a value as aBoolean
array.- Specified by:
getValueAsBooleanArray
in interfaceParameter
- Returns:
- a
Boolean
array
-
getValueAsBooleanList
public java.util.List<java.lang.Boolean> getValueAsBooleanList()
Description copied from interface:Parameter
Returns a value as aList<Boolean>
.- Specified by:
getValueAsBooleanList
in interfaceParameter
- Returns:
- a
List<Boolean>
-
getValueAsParameters
public Parameters getValueAsParameters()
Description copied from interface:Parameter
Returns a value as aParameters
.- Specified by:
getValueAsParameters
in interfaceParameter
- Returns:
- a
Parameters
-
getValueAsParametersArray
public Parameters[] getValueAsParametersArray()
Description copied from interface:Parameter
Returns a value as aParameters
array.- Specified by:
getValueAsParametersArray
in interfaceParameter
- Returns:
- a
Parameters
array
-
getValueAsParametersList
public java.util.List<Parameters> getValueAsParametersList()
Description copied from interface:Parameter
Returns a value as aList<Parameters>
.- Specified by:
getValueAsParametersList
in interfaceParameter
- Returns:
- a
List<Parameters>
-
newParameters
public <T extends Parameters> T newParameters(Parameter identifier)
Description copied from interface:Parameter
Creates a new instance ofParameters
with the specified identifierParameter
.- Specified by:
newParameters
in interfaceParameter
- Type Parameters:
T
- the type of the new Parameters object- Parameters:
identifier
- the specified identifierParameter
- Returns:
- a
Parameters
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-