Package org.glassfish.gmbal.impl
Class TypeConverterImpl
java.lang.Object
org.glassfish.gmbal.impl.TypeConverterImpl
- All Implemented Interfaces:
TypeConverter
- Direct Known Subclasses:
TypeConverterImpl.TypeConverterListBase,TypeConverterImpl.TypeConverterMapBase
A ManagedEntity is one of the pre-defined Open MBean types: SimpleType,
ObjectName, TabularData, or CompositeData.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static interfaceprivate static classprivate static classprivate static classprivate static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final EvaluatedTypeprotected final OpenTypeprivate static final Runnablestatic final Stringprivate static final Map<OpenType, EvaluatedClassDeclaration> private static final Map<EvaluatedType, OpenType> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeConverterImpl(EvaluatedType dataType, OpenType managedType) -
Method Summary
Modifier and TypeMethodDescriptionprivate static Collection<AttributeDescriptor> private static EvaluatedTypeprivate static voidprivate StringdisplayOpenType(OpenType otype) private static Iteratorprivate static TypeConverterImpl.Tableprivate static EvaluatedMethodDeclarationfindMethod(EvaluatedClassAnalyzer eca, String mname) fromManagedEntity(Object entity) Convert from a ManagedEntity to a problem-domain Object.private static ArrayTypegetArrayType(OpenType ot) final EvaluatedTypeJava generic type of attribute in problem-domain Object.static ClassgetJavaClass(OpenType ot) static ClassgetJavaClass(EvaluatedType type) final OpenTypeOpen MBeans Open Type for management domain object.private static EvaluatedTypegetParameterType(EvaluatedClassDeclaration decl, String mname, int pindex) private static EvaluatedTypegetReturnType(EvaluatedClassDeclaration decl, String mname) private static TypeConverterprivate static TypeConverterprivate static TypeConverterprivate static TypeConverterprivate static TypeConverterprivate static TypeConverterhandleManagedObject(EvaluatedClassDeclaration type, ManagedObjectManagerInternal mom, ManagedObject mo) private static TypeConverterhandleSimpleType(EvaluatedType type, OpenType stype) private static voidinitMaps(OpenType otype, EvaluatedClassDeclaration... types) booleanReturns true if this TypeConverter is an identity transformation.private static CompositeTypemakeCompositeType(EvaluatedClassDeclaration cls, ManagedObjectManagerInternal mom, ManagedData md, Collection<AttributeDescriptor> minfos) static TypeConverterabstract ObjecttoManagedEntity(Object obj) Convert from a problem-domain Object obj to a managed entity.toString()
-
Field Details
-
simpleTypeMap
-
simpleOpenTypeMap
-
NULL_STRING
- See Also:
-
NoOp
-
dataType
-
managedType
-
-
Constructor Details
-
TypeConverterImpl
-
-
Method Details
-
initMaps
-
getJavaClass
-
canonicalType
-
getJavaClass
-
makeTypeConverter
-
handleSimpleType
-
handleManagedObject
private static TypeConverter handleManagedObject(EvaluatedClassDeclaration type, ManagedObjectManagerInternal mom, ManagedObject mo) -
analyzeManagedData
private static Collection<AttributeDescriptor> analyzeManagedData(EvaluatedClassDeclaration cls, ManagedObjectManagerInternal mom) -
describe
-
makeCompositeType
private static CompositeType makeCompositeType(EvaluatedClassDeclaration cls, ManagedObjectManagerInternal mom, ManagedData md, Collection<AttributeDescriptor> minfos) -
handleManagedData
private static TypeConverter handleManagedData(EvaluatedClassDeclaration cls, ManagedObjectManagerInternal mom, ManagedData md) -
handleEnum
-
getArrayType
- Throws:
OpenDataException
-
handleArrayType
private static TypeConverter handleArrayType(EvaluatedArrayType type, ManagedObjectManagerInternal mom) throws OpenDataException - Throws:
OpenDataException
-
findMethod
-
getReturnType
-
getParameterType
private static EvaluatedType getParameterType(EvaluatedClassDeclaration decl, String mname, int pindex) -
emptyTable
-
emptyIterator
-
handleClass
private static TypeConverter handleClass(EvaluatedClassDeclaration type, ManagedObjectManagerInternal mom) -
handleAsString
-
getDataType
Description copied from interface:TypeConverterJava generic type of attribute in problem-domain Object.- Specified by:
getDataTypein interfaceTypeConverter- Returns:
- The Java type that this TypeConverter handles.
-
getManagedType
Description copied from interface:TypeConverterOpen MBeans Open Type for management domain object.- Specified by:
getManagedTypein interfaceTypeConverter- Returns:
- The OpenType that this TypeConverter handles.
-
toManagedEntity
Description copied from interface:TypeConverterConvert from a problem-domain Object obj to a managed entity.- Specified by:
toManagedEntityin interfaceTypeConverter- Parameters:
obj- The Java object to be converted to an open type.- Returns:
- The resulting open type.
-
fromManagedEntity
Description copied from interface:TypeConverterConvert from a ManagedEntity to a problem-domain Object.- Specified by:
fromManagedEntityin interfaceTypeConverter- Parameters:
entity- The managed entity to be converted to a java type.- Returns:
- The resulting java type.
-
isIdentity
public boolean isIdentity()Description copied from interface:TypeConverterReturns true if this TypeConverter is an identity transformation.- Specified by:
isIdentityin interfaceTypeConverter- Returns:
- True if this TypeConverter is an identity transformation.
-
displayOpenType
-
toString
-