public class Item
extends java.lang.Object
CompositeType
, TabularType
, and ArrayType
.
The normal creation throws a checked exception, making it impossible to use
them in a static initializer. They constructors are also not very suitable
for static construction.
An Item instance describes an item in a Composite Type. It groups the triplet
of name, description, and Open Type. These Item instances allows the
definitions of an item to stay together.Constructor and Description |
---|
Item(java.lang.String name,
java.lang.String description,
javax.management.openmbean.OpenType type,
java.lang.String... restrictions)
Create a triple of name, description, and type.
|
Modifier and Type | Method and Description |
---|---|
static <T> javax.management.openmbean.ArrayType<T> |
arrayType(int dim,
javax.management.openmbean.OpenType<T> elementType)
Return a new Array Type.
|
static javax.management.openmbean.CompositeType |
compositeType(java.lang.String name,
java.lang.String description,
Item... items)
Create a Composite Type
|
static javax.management.openmbean.CompositeType |
extend(javax.management.openmbean.CompositeType parent,
java.lang.String name,
java.lang.String description,
Item... items)
Extend a Composite Type by adding new items.
|
static javax.management.openmbean.TabularType |
tabularType(java.lang.String name,
java.lang.String description,
javax.management.openmbean.CompositeType rowType,
java.lang.String... index)
Create a Tabular Type.
|
public Item(java.lang.String name, java.lang.String description, javax.management.openmbean.OpenType type, java.lang.String... restrictions)
name
- The name of the item.description
- The description of the item.type
- The Open Type of this item.restrictions
- Ignored, contains list of restrictionspublic static javax.management.openmbean.TabularType tabularType(java.lang.String name, java.lang.String description, javax.management.openmbean.CompositeType rowType, java.lang.String... index)
name
- The name of the Tabular Type.description
- The description of the Tabular Type.rowType
- The Open Type for a rowindex
- The names of the items that form the index .java.lang.RuntimeException
- when the Tabular Type throws an OpenDataExceptionpublic static javax.management.openmbean.CompositeType compositeType(java.lang.String name, java.lang.String description, Item... items)
name
- The name of the Tabular Type.description
- The description of the Tabular Type.items
- The items that describe the composite type.java.lang.RuntimeException
- when the Tabular Type throws an OpenDataExceptionpublic static <T> javax.management.openmbean.ArrayType<T> arrayType(int dim, javax.management.openmbean.OpenType<T> elementType)
dim
- The dimensionelementType
- The element typepublic static javax.management.openmbean.CompositeType extend(javax.management.openmbean.CompositeType parent, java.lang.String name, java.lang.String description, Item... items)
parent
- The parent type, can be null
name
- The name of the typedescription
- The description of the typeitems
- The items that should be added/override to the parent typejava.lang.RuntimeException
- when an OpenDataException is thrownCopyright © 2010 - 2020 Adobe. All Rights Reserved