java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.properties.impl.PropertyUtil |
Utility routines for properties, property managers, and property definition managers.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PropertyUtil() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static <V extends Enum<V>> V |
convertSelectionId(int id, Class<V> cl)
Convenience method used to convert a selection id into an enumerated constant.
| ||||||||||
static <V extends Enum<V>> V |
convertSelectionId(int id, Class<V> cl, V def)
Convenience method used to convert a selection id into an enumerated constant.
| ||||||||||
static String |
extractName(String fqname)
Extract the simple name of a property.
| ||||||||||
static String |
extractNs(String fqname)
Extract the namespace of a property.
| ||||||||||
static String |
formatList(IPropertyDefinitionManager pdm, boolean alphasort)
Print the list of properties defined by the provided PDM and its descendants (not the
ascendants).
| ||||||||||
static String |
formatTree(IPropertyDefinitionManager pdm, boolean alphasort)
Print a tree view of properties defined by the provided PDM and its descendants (not the
ascendants).
| ||||||||||
static IPropertyDefinition |
getDefinition(IPropertyDefinitionManager pdm, String fqname)
Retrieve a property from a fully-qualified name
| ||||||||||
static IPropertyDefinitionManager |
getNamespace(IPropertyDefinitionManager pdm, String namespace)
Retrieve a namespace.
| ||||||||||
static IPropertyDefinitionManager |
getRoot(IPropertyDefinitionManager pdm)
Retrieve the root of a PDM tree from any PDM in that tree.
| ||||||||||
static PropertyInputSizeHint |
getSizeHint(int flags)
Retrieve a hint regarding the visual size of a property, from the property flags.
| ||||||||||
static boolean |
hasDescendants(IPropertyDefinitionManager pdm)
Determine whether a PDM has descendant properties.
| ||||||||||
static boolean |
hasDescendants(IPropertyDefinitionManager pdm, int mustHaveFlags, int cantHaveFlags)
Determine whether a PDM has descendant properties (modulo the provided criteria).
| ||||||||||
static String |
levelUp(String fqname)
Generate the fully-qualified name of a similarly-named property one namespace above the
current property name namespace.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Convenience method used to convert a selection id into an enumerated constant.
Convenience method used to convert a selection id into an enumerated constant.
Extract the simple name of a property. Examples:
.com.foo.Bar => Bar .X => X
fqname | a fully-qualified property name |
---|
Extract the namespace of a property. Examples:
.com.foo.Bar => .com.foo .X => (empty string)
fqname | a fully-qualified property name |
---|
Print the list of properties defined by the provided PDM and its descendants (not the ascendants).
Print a tree view of properties defined by the provided PDM and its descendants (not the ascendants).
Retrieve a property from a fully-qualified name
pdm | any PDM |
---|---|
fqname | a fully-qualified property name, which must start with '.' |
Retrieve a namespace.
pdm | a root or non-root PDM |
---|---|
namespace | a relative or fully-qualified region or sub-region name, eg ".com.pnf.abc", "com.pnf", pnf.abc.def", etc. |
Retrieve the root of a PDM tree from any PDM in that tree.
Retrieve a hint regarding the visual size of a property, from the property flags.
Determine whether a PDM has descendant properties.
Determine whether a PDM has descendant properties (modulo the provided criteria).
Generate the fully-qualified name of a similarly-named property one namespace above the current property name namespace. Examples:
.com.foo.Bar => .com.Bar .X => null (error)
fqname | a fully-qualified property name |
---|