Package PamModel.parametermanager
Class PamParameterSet
java.lang.Object
PamModel.parametermanager.PamParameterSet
Description of the parameters within a class. Primarily holds a list
of PamParameterDataInterface objects each describing one field in the
object.
- Author:
- Doug Gillespie
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intStandard modifiers to exclude. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PamParameterSetautoGenerate(Object parentObject) Deprecated.static PamParameterSetautoGenerate(Object parentObject, int excludedModifiers) Automatically generate a parameter set for a class.static PamParameterSetautoGenerate(Object parentObject, PamParameterSet.ParameterSetType parameterSetType) Automatically generate a parameter set for a class.static PamParameterSetcheckSpecials(Object parentObject, int excludedModifiers) findParameterData(String paramName) Find parameter data with the given name.voidput(PamParameterData pamParam) removeParameterData(String paramName) Remove a parameter data from the setvoidsetParameterSetType(PamParameterSet.ParameterSetType parameterSetType)
-
Field Details
-
STANDARD_MODIFIER_EXCLUSIONS
public static final int STANDARD_MODIFIER_EXCLUSIONSStandard modifiers to exclude. This is important for many classes which will tend to do crazy things such as incorporate ALL of their final fields, e.g. when a Color object is written, you'll get a million static colours and still not get the RGB you want. (Color actually got a special - may need to do this for some other types too !)- See Also:
-
-
Constructor Details
-
PamParameterSet
Create and empty set. Generally it's better to use one of the autoGenerate functions.- Parameters:
parentObject-
-
-
Method Details
-
autoGenerate
Deprecated.Automatically generate a parameter set for a class. Will include all public fields and any private or protected fields for which a getter can be found that has a similar enough name- Parameters:
parentObject- class to generate description for. Exception is anything that's listed in the STANDARD_MODIFIER_EXCLUSIONS list (FINAL or STATIC).- Returns:
- Created parameter set.
-
autoGenerate
public static PamParameterSet autoGenerate(Object parentObject, PamParameterSet.ParameterSetType parameterSetType) Automatically generate a parameter set for a class. Will include all public fields and any private or protected fields for which a getter can be found that has a similar enough name- Parameters:
parentObject- class to generate description for. Exception is anything that's listed in the STANDARD_MODIFIER_EXCLUSIONS list (FINAL or STATIC).- Returns:
- Created parameter set.
-
autoGenerate
Automatically generate a parameter set for a class. Will include all public fields and any private or protected fields for which a getter can be found that has a similar enough name so long as the fields modifiers are not included within the excludedModifiers parameter- Parameters:
parentObject- class to generate description forexcludedModifiers- bitmap of modifiers for fields you want to exclude, e.g. Modifier.FINAL | Modifier.STATIC- Returns:
- Created parameter set.
- See Also:
-
checkSpecials
-
put
-
getParentObject
- Returns:
- the parentObject
-
getParameterDatas
- Returns:
- the parameterData list
- See Also:
-
getParameterCollection
-
findParameterData
Find parameter data with the given name.- Parameters:
paramName-- Returns:
- Throws:
FieldNotFoundException
-
removeParameterData
Remove a parameter data from the set- Parameters:
paramName- Parameter name (name of field in the owning class)- Returns:
- the PamParameterData associated with that parameter name from the internal hashtable, or null if the parameter was not found
-
getParameterSetType
- Returns:
- the parameterSetType
-
setParameterSetType
- Parameters:
parameterSetType- the parameterSetType to set
-