| java.lang.Object javax.media.jai.ParameterListDescriptorImpl
ParameterListDescriptorImpl | public ParameterListDescriptorImpl()(Code) | | Constructor for descriptors that dont have any parameters.
|
ParameterListDescriptorImpl | public ParameterListDescriptorImpl(Object descriptor, String[] paramNames, Class[] paramClasses, Object[] paramDefaults, Object[] validParamValues)(Code) | | Constructor.
Parameters: descriptor - the object to be reflected upon for enumerated values Parameters: paramNames - the names of each parameter. can be null if there are no parameters. Parameters: paramClasses - the Class type of each parameter.can be null if there are no parameters. Parameters: paramDefaults - the default values for each parameter. can benull if there are no parameters or ifthere are no default values, in which case the parameterdefaults are assumed to be ParameterListDescriptor.NO_PARAMETER_DEFAULT Parameters: validParamValues - defines the valid values for each parameter.Each element of this array can be null (if the parameter can take on any value of its class or if it is an enumerated parameterwhose values are to be auto-detected - see getEnumeratedValues ), or a Set (for user specified enumeratedvalues) or a Range (for parameters that areComparable .) The valid set of values for an object which is neither anEnumeratedParameter nor Comparable should just be the set of all possible instances of the associatedclass, i.e., the parameter has to be an instance of the specifiedclass. If this array itself is null then it is treatedas an array full of null s as described above. throws: IllegalArgumentException - if paramNames is non-nulland the number of paramClasses or a non-nullparamDefaults does not match the length ofparamNames throws: IllegalArgumentException - if null is passed in forvalidParamValues for a parameter whoseclass is of EnumeratedParameter type. |
getEnumeratedParameterNames | public String[] getEnumeratedParameterNames()(Code) | | Return an array of the names of all parameters the type of which is
EnumeratedParameter .
The requested array of names or null if thereare no parameters with EnumeratedParameter type. |
getEnumeratedParameterValues | public EnumeratedParameter[] getEnumeratedParameterValues(String parameterName)(Code) | | Return an array of EnumeratedParameter objects
corresponding to the parameter with the specified name.
Parameters: parameterName - The name of the parameter for which theEnumeratedParameter array is to be returned. throws: IllegalArgumentException - if parameterName is nullor if the parameter does not exist. throws: UnsupportedOperationException - if there are no enumeratedparameters associated with the descriptor. throws: IllegalArgumentException - if parameterName isa parameter the class of which is not a subclass ofEnumeratedParameter . An array of EnumeratedParameter objectsrepresenting the range of values for the named parameter. |
getEnumeratedValues | public static Set getEnumeratedValues(Object descriptor, Class paramClass)(Code) | | Uses reflection to examine "descriptor" for public ,
static final Field s
that are instances of "paramClass".
Parameters: descriptor - the object to be reflected upon. Parameters: paramClass - the parameter class a Set of enumerated values. throws: IllegalArgumentException - if descriptor is null or paramClass is null throws: IllegalArgumentException - if "paramClass" is not an instance ofEnumeratedParameter |
getNumParameters | public int getNumParameters()(Code) | | Returns the total number of parameters.
|
getParamClasses | public Class[] getParamClasses()(Code) | | Returns an array of Class es that describe the types
of parameters. If there are no parameters, this method returns
null .
|
getParamDefaultValue | public Object getParamDefaultValue(String parameterName)(Code) | | Returns the default value of a specified parameter. The default
value may be null . If a parameter has no default
value, this method returns NO_PARAMETER_DEFAULT .
Parameters: parameterName - The name of the parameter whose defaultvalue is queried. throws: IllegalArgumentException - if parameterName is nullor if the parameter does not exist. |
getParamDefaults | public Object[] getParamDefaults()(Code) | | Returns an array of Object s that define the default
values of the parameters. Default values may be null .
The NO_PARAMETER_DEFAULT static Object
indicates that a parameter has no default value. If there are no
parameters, this method returns null .
|
getParamNames | public String[] getParamNames()(Code) | | Returns an array of String s that are the
names of the parameters associated with this descriptor. If there
are no parameters, this method returns null .
|
getParamValueRange | public Range getParamValueRange(String parameterName)(Code) | | Returns the Range that represents the range of valid
values for the specified parameter. Returns null if
the parameter can take on any value or if the valid values are
not representable as a Range.
Parameters: parameterName - The name of the parameter whose valid rangeof values is to be determined. throws: IllegalArgumentException - if parameterName is nullor if the parameter does not exist. |
isParameterValueValid | public boolean isParameterValueValid(String parameterName, Object value)(Code) | | Checks to see if the specified parameter can take on the specified
value.
Parameters: parameterName - The name of the parameter for which thevalidity check is to be performed. throws: IllegalArgumentException - if parameterName is nullor if the parameter does not exist. throws: IllegalArgumentException - if the class of the object "value"is not an instance of the class type of parameterpointed to by the parameterName true, if it is valid to pass this value in for thisparameter, false otherwise. |
|
|