Package com.aspectran.utils.apon
Class ParameterValue
java.lang.Object
com.aspectran.utils.apon.ParameterValue
- All Implemented Interfaces:
Parameter
-
Constructor Summary
ConstructorsModifierConstructorDescriptionParameterValue
(String name, ValueType valueType) ParameterValue
(String name, ValueType valueType, boolean array) ParameterValue
(String name, ValueType valueType, boolean array, boolean noBracket) protected
ParameterValue
(String name, ValueType valueType, boolean array, boolean noBracket, boolean valueTypeFixed) ParameterValue
(String name, Class<? extends AbstractParameters> parametersClass) ParameterValue
(String name, Class<? extends AbstractParameters> parametersClass, boolean array) ParameterValue
(String name, Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket) protected
ParameterValue
(String name, Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket, boolean valueTypeFixed) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Change parameter type to array type.int
Returns the size of the array if the value is an array.Returns theParameters
that contains theParameter
.getName()
Returns the parameter name.Returns the fully qualified parameter name.getValue()
Returns a value as anObject
.Returns a value as aBoolean
.Boolean[]
Returns a value as aBoolean
array.Returns a value as aList<Boolean>
.Returns a value as aDouble
.Double[]
Returns a value as aDouble
array.Returns a value as aList<Double>
.Returns a value as aFloat
.Float[]
Returns a value as aFloat
array.Returns a value as aList<Float>
.Returns a value as anInteger
.Integer[]
Returns a value as anInteger
array.Returns a value as aList<Integer>
.Returns a value as aLong
.Long[]
Returns a value as aLong
array.Returns a value as aList<Long>
.Returns a value as aParameters
.Returns a value as aParameters
array.Returns a value as aList<Parameters>
.Returns a value as aString
.String[]
Returns a value as aString
array.Returns a value as aList<String>
.List<?>
Returns a value as aList
.Object[]
Returns a value as anObject
array.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
Returns whether a parameter has been assigned a value.boolean
Returns whether the value of the array is represented using square brackets.boolean
Returns whether this is a predefined parameter.boolean
Returns whether the value type is hinted.<T extends Parameters>
TnewParameters
(Parameter identifier) Creates a new instance ofParameters
with the specified identifierParameter
.void
Puts the parameter value.void
Removes 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.toString()
-
Constructor Details
-
ParameterValue
-
ParameterValue
-
ParameterValue
-
ParameterValue
-
ParameterValue
-
ParameterValue
public ParameterValue(String name, Class<? extends AbstractParameters> parametersClass, boolean array) -
ParameterValue
public ParameterValue(String name, Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket) -
ParameterValue
protected ParameterValue(String name, Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket, boolean valueTypeFixed)
-
-
Method Details
-
getContainer
Description copied from interface:Parameter
Returns theParameters
that contains theParameter
.- Specified by:
getContainer
in interfaceParameter
- Returns:
- the
Parameters
-
setContainer
-
getName
Description copied from interface:Parameter
Returns the parameter name. -
getQualifiedName
Description copied from interface:Parameter
Returns the fully qualified parameter name.- Specified by:
getQualifiedName
in interfaceParameter
- Returns:
- the qualified name
-
getValueType
Description copied from interface:Parameter
Returns the parameter value type.- Specified by:
getValueType
in interfaceParameter
- Returns:
- the parameter value type
-
setValueType
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
Description copied from interface:Parameter
Puts the parameter value. -
removeValue
public void removeValue()Description copied from interface:Parameter
Removes the parameter value.- Specified by:
removeValue
in interfaceParameter
-
getValue
Description copied from interface:Parameter
Returns a value as anObject
. -
getValueList
Description copied from interface:Parameter
Returns a value as aList
.- Specified by:
getValueList
in interfaceParameter
- Returns:
- a
List
-
getValues
Description copied from interface:Parameter
Returns a value as anObject
array. -
getValueAsString
Description copied from interface:Parameter
Returns a value as aString
.- Specified by:
getValueAsString
in interfaceParameter
- Returns:
- a
String
-
getValueAsStringArray
Description copied from interface:Parameter
Returns a value as aString
array.- Specified by:
getValueAsStringArray
in interfaceParameter
- Returns:
- a
String
array
-
getValueAsStringList
Description copied from interface:Parameter
Returns a value as aList<String>
.- Specified by:
getValueAsStringList
in interfaceParameter
- Returns:
- a
List<String>
-
getValueAsInt
Description copied from interface:Parameter
Returns a value as anInteger
.- Specified by:
getValueAsInt
in interfaceParameter
- Returns:
- an
Integer
-
getValueAsIntArray
Description copied from interface:Parameter
Returns a value as anInteger
array.- Specified by:
getValueAsIntArray
in interfaceParameter
- Returns:
- an
Integer
array
-
getValueAsIntList
Description copied from interface:Parameter
Returns a value as aList<Integer>
.- Specified by:
getValueAsIntList
in interfaceParameter
- Returns:
- a
List<Integer>
-
getValueAsLong
Description copied from interface:Parameter
Returns a value as aLong
.- Specified by:
getValueAsLong
in interfaceParameter
- Returns:
- a
Long
-
getValueAsLongArray
Description copied from interface:Parameter
Returns a value as aLong
array.- Specified by:
getValueAsLongArray
in interfaceParameter
- Returns:
- a
Long
array
-
getValueAsLongList
Description copied from interface:Parameter
Returns a value as aList<Long>
.- Specified by:
getValueAsLongList
in interfaceParameter
- Returns:
- a
List<Long>
-
getValueAsFloat
Description copied from interface:Parameter
Returns a value as aFloat
.- Specified by:
getValueAsFloat
in interfaceParameter
- Returns:
- a
Float
-
getValueAsFloatArray
Description copied from interface:Parameter
Returns a value as aFloat
array.- Specified by:
getValueAsFloatArray
in interfaceParameter
- Returns:
- a
Float
array
-
getValueAsFloatList
Description copied from interface:Parameter
Returns a value as aList<Float>
.- Specified by:
getValueAsFloatList
in interfaceParameter
- Returns:
- a
List<Float>
-
getValueAsDouble
Description copied from interface:Parameter
Returns a value as aDouble
.- Specified by:
getValueAsDouble
in interfaceParameter
- Returns:
- a
Double
-
getValueAsDoubleArray
Description copied from interface:Parameter
Returns a value as aDouble
array.- Specified by:
getValueAsDoubleArray
in interfaceParameter
- Returns:
- a
Double
array
-
getValueAsDoubleList
Description copied from interface:Parameter
Returns a value as aList<Double>
.- Specified by:
getValueAsDoubleList
in interfaceParameter
- Returns:
- a
List<Double>
-
getValueAsBoolean
Description copied from interface:Parameter
Returns a value as aBoolean
.- Specified by:
getValueAsBoolean
in interfaceParameter
- Returns:
- a
Boolean
-
getValueAsBooleanArray
Description copied from interface:Parameter
Returns a value as aBoolean
array.- Specified by:
getValueAsBooleanArray
in interfaceParameter
- Returns:
- a
Boolean
array
-
getValueAsBooleanList
Description copied from interface:Parameter
Returns a value as aList<Boolean>
.- Specified by:
getValueAsBooleanList
in interfaceParameter
- Returns:
- a
List<Boolean>
-
getValueAsParameters
Description copied from interface:Parameter
Returns a value as aParameters
.- Specified by:
getValueAsParameters
in interfaceParameter
- Returns:
- a
Parameters
-
getValueAsParametersArray
Description copied from interface:Parameter
Returns a value as aParameters
array.- Specified by:
getValueAsParametersArray
in interfaceParameter
- Returns:
- a
Parameters
array
-
getValueAsParametersList
Description copied from interface:Parameter
Returns a value as aList<Parameters>
.- Specified by:
getValueAsParametersList
in interfaceParameter
- Returns:
- a
List<Parameters>
-
newParameters
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
-