# Class: com.pnfsoftware.jeb.core.properties.impl.PropertyUtil

Utility routines for properties, property managers, and property definition managers.

## Static Method: convertSelectionId
- parameter: `id`, type: `int`
- parameter: `cl`, type: `java.lang.Class<V>`
- return type: `V`

Description: Convenience method used to convert a selection id into an enumerated constant.
parameter: V: 
parameter: id: 
parameter: cl: 
return: the enum whose ordinal matches the provided id, or null on error

## Static Method: convertSelectionId
- parameter: `id`, type: `int`
- parameter: `cl`, type: `java.lang.Class<V>`
- parameter: `def`, type: `V`
- return type: `V`

Description: Convenience method used to convert a selection id into an enumerated constant.
parameter: V: 
parameter: id: 
parameter: cl: 
parameter: def: 
return: the enum whose ordinal matches the provided id, or the default value on error

## Static Method: extractName
- parameter: `fqname`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Extract the simple name of a property. Examples:  

```

 .com.foo.Bar => Bar .X => X
 
```
parameter: fqname: a fully\-qualified property name
return: null on error

## Static Method: extractNs
- parameter: `fqname`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Extract the namespace of a property. Examples:  

```

 .com.foo.Bar => .com.foo
 .X => (empty string)
 
```
parameter: fqname: a fully\-qualified property name
return: null on error

## Static Method: formatList
- parameter: `pdm`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`
- parameter: `alphasort`, type: `boolean`
- return type: `java.lang.String`

Description: Print the list of properties defined by the provided PDM and its descendants \(not the ascendants\).
parameter: pdm: root of the tree to print
parameter: alphasort: if `true`, sort properties alphabetically within each namespace
return: a textual flat list of properties

## Static Method: formatTree
- parameter: `pdm`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`
- parameter: `alphasort`, type: `boolean`
- return type: `java.lang.String`

Description: Print a tree view of properties defined by the provided PDM and its descendants \(not the ascendants\).
parameter: pdm: root of the tree to print
parameter: alphasort: if `true`, sort properties alphabetically within each namespace
return: a textual tree representation of properties

## Static Method: getDefinition
- parameter: `pdm`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`
- parameter: `fqname`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinition`

Description: Retrieve a property from a fully\-qualified name
parameter: pdm: any PDM
parameter: fqname: a fully\-qualified property name, which must start with '.'
return: the definition or null

## Static Method: getNamespace
- parameter: `pdm`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`
- parameter: `namespace`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`

Description: Retrieve a namespace.
parameter: pdm: a root or non\-root PDM
parameter: namespace: a relative or fully\-qualified region or sub\-region name, eg ".com.pnf.abc",            "com.pnf", pnf.abc.def", etc.
return: the PDM of the provided region, null on error

## Static Method: getRoot
- parameter: `pdm`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`

Description: Retrieve the root of a PDM tree from any PDM in that tree.
parameter: pdm: any property definition manager in the hierarchy
return: the root property definition manager

## Static Method: getSizeHint
- parameter: `flags`, type: `int`
- return type: `com.pnfsoftware.jeb.core.properties.impl.PropertyInputSizeHint`

Description: Retrieve a hint regarding the visual size of a property, from the property flags.
parameter: flags: property flags
return: the corresponding input size hint

## Static Method: hasDescendants
- parameter: `pdm`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`
- return type: `boolean`

Description: Determine whether a PDM has descendant properties.
parameter: pdm: root manager to inspect
return: `true` if the manager or one of its descendants defines a property

## Static Method: hasDescendants
- parameter: `pdm`, type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`
- parameter: `mustHaveFlags`, type: `int`
- parameter: `cantHaveFlags`, type: `int`
- return type: `boolean`

Description: Determine whether a PDM has descendant properties \(modulo the provided criteria\).
parameter: pdm: root manager to inspect
parameter: mustHaveFlags: flags that matching properties must all contain
parameter: cantHaveFlags: flags that matching properties must not contain
return: `true` if a matching property exists in the tree

## Static Method: levelUp
- parameter: `fqname`, type: `java.lang.String`
- return type: `java.lang.String`

Description: 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)
 
```
parameter: fqname: a fully\-qualified property name
return: null on error

