Top Description Inners Fields Constructors Methods
org.glassfish.gmbal.impl

public abstract Class TypeConverterImpl

extends Object
implements TypeConverter
Class Inheritance
All Implemented Interfaces
org.glassfish.gmbal.impl.TypeConverter
Known Direct Subclasses
org.glassfish.gmbal.impl.TypeConverterImpl.TypeConverterListBase, org.glassfish.gmbal.impl.TypeConverterImpl.TypeConverterMapBase
Annotations
@TraceRuntime
@TraceRegistration
@TraceRegistrationFine
Imports
org.glassfish.gmbal.impl.trace.TraceRuntime, .TraceRegistrationFine, .TraceRegistration, org.glassfish.pfl.tf.spi.annotation.InfoMethod, org.glassfish.pfl.basic.algorithm.DumpToString, .Algorithms, org.glassfish.pfl.basic.contain.Pair, org.glassfish.pfl.basic.facet.FacetAccessor, org.glassfish.pfl.basic.func.UnaryPredicate, java.lang.reflect.Array, .Constructor, .InvocationTargetException, java.util.Collection, .List, .ArrayList, .Map, .HashMap, .Iterator, .Enumeration, .Dictionary, .Arrays, javax.management.ObjectName, .JMException, javax.management.openmbean.ArrayType, .OpenType, .OpenDataException, .SimpleType, .TabularType, .CompositeType, .CompositeData, .CompositeDataSupport, .TabularData, .TabularDataSupport, org.glassfish.gmbal.AMXClient, .ManagedObject, .ManagedData, org.glassfish.gmbal.typelib.EvaluatedArrayType, .EvaluatedClassAnalyzer, .EvaluatedClassDeclaration, .EvaluatedMethodDeclaration, .EvaluatedType

A ManagedEntity is one of the pre-defined Open MBean types: SimpleType, ObjectName, TabularData, or CompositeData.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static interface
private static class
private static class
private abstract static class
private abstract static class
public static class

Field Summary

Modifier and TypeField and Description
protected final EvaluatedType
protected final OpenType<T>
private static final Runnable
public static final String
private static final Map<OpenType<T>, EvaluatedClassDeclaration>
private static final Map<EvaluatedType, OpenType<T>>

Constructor Summary

AccessConstructor and Description
protected
TypeConverterImpl(final EvaluatedType dataType, final OpenType<T> managedType)

Method Summary

Modifier and TypeMethod and Description
private static Collection<AttributeDescriptor>
private static EvaluatedType
private static void
describe(String msg, Object data)

private String
private static Iterator<E>
private static TypeConverterImpl.Table<K, V>
private static EvaluatedMethodDeclaration
findMethod(final EvaluatedClassAnalyzer eca, final String mname)

public Object
fromManagedEntity(Object entity)

Implements org.glassfish.gmbal.impl.TypeConverter.fromManagedEntity.

Convert from a ManagedEntity to a problem-domain Object.

private static ArrayType<T>
public final EvaluatedType
getDataType()

Implements org.glassfish.gmbal.impl.TypeConverter.getDataType.

Java generic type of attribute in problem-domain Object.

public static Class<T>
getJavaClass(final OpenType<T> ot)

public static Class<T>
public final OpenType<T>
getManagedType()

Implements org.glassfish.gmbal.impl.TypeConverter.getManagedType.

Open MBeans Open Type for management domain object.

private static EvaluatedType
private static EvaluatedType
private static TypeConverter
private static TypeConverter
private static TypeConverter
private static TypeConverter
private static TypeConverter
private static TypeConverter
private static TypeConverter
handleSimpleType(final EvaluatedType type, final OpenType<T> stype)

private static void
initMaps(final OpenType<T> otype, final EvaluatedClassDeclaration... types)

public boolean
isIdentity()

Implements org.glassfish.gmbal.impl.TypeConverter.isIdentity.

Returns true if this TypeConverter is an identity transformation.

private static CompositeType
public static TypeConverter
public abstract Object
toManagedEntity(Object obj)

Redeclares org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Convert from a problem-domain Object obj to a managed entity.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

dataTypeback to summary
protected final EvaluatedType dataType
Annotations
@DumpToString
managedTypeback to summary
protected final OpenType<T> managedType
Annotations
@DumpToString
NoOpback to summary
private static final Runnable NoOp
NULL_STRINGback to summary
public static final String NULL_STRING
simpleOpenTypeMapback to summary
private static final Map<OpenType<T>, EvaluatedClassDeclaration> simpleOpenTypeMap
simpleTypeMapback to summary
private static final Map<EvaluatedType, OpenType<T>> simpleTypeMap

Constructor Detail

TypeConverterImplback to summary
protected TypeConverterImpl(final EvaluatedType dataType, final OpenType<T> managedType)

Method Detail

analyzeManagedDataback to summary
private static Collection<AttributeDescriptor> analyzeManagedData(final EvaluatedClassDeclaration cls, final ManagedObjectManagerInternal mom)
Annotations
@TraceRegistration
canonicalTypeback to summary
private static EvaluatedType canonicalType(EvaluatedType et)
describeback to summary
private static void describe(String msg, Object data)
Annotations
@InfoMethod
displayOpenTypeback to summary
private String displayOpenType(OpenType<T> otype)
emptyIteratorback to summary
private static Iterator<E> emptyIterator()
emptyTableback to summary
private static TypeConverterImpl.Table<K, V> emptyTable()
findMethodback to summary
private static EvaluatedMethodDeclaration findMethod(final EvaluatedClassAnalyzer eca, final String mname)
fromManagedEntityback to summary
public Object fromManagedEntity(Object entity)

Implements org.glassfish.gmbal.impl.TypeConverter.fromManagedEntity.

Doc from org.glassfish.gmbal.impl.TypeConverter.fromManagedEntity.

Convert from a ManagedEntity to a problem-domain Object.

getArrayTypeback to summary
private static ArrayType<T> getArrayType(OpenType<T> ot) throws OpenDataException
getDataTypeback to summary
public final EvaluatedType getDataType()

Implements org.glassfish.gmbal.impl.TypeConverter.getDataType.

Doc from org.glassfish.gmbal.impl.TypeConverter.getDataType.

Java generic type of attribute in problem-domain Object.

getJavaClassback to summary
public static Class<T> getJavaClass(final OpenType<T> ot)
getJavaClassback to summary
public static Class<T> getJavaClass(final EvaluatedType type)
getManagedTypeback to summary
public final OpenType<T> getManagedType()

Implements org.glassfish.gmbal.impl.TypeConverter.getManagedType.

Doc from org.glassfish.gmbal.impl.TypeConverter.getManagedType.

Open MBeans Open Type for management domain object.

getParameterTypeback to summary
private static EvaluatedType getParameterType(EvaluatedClassDeclaration decl, String mname, int pindex)
getReturnTypeback to summary
private static EvaluatedType getReturnType(EvaluatedClassDeclaration decl, String mname)
handleArrayTypeback to summary
private static TypeConverter handleArrayType(final EvaluatedArrayType type, final ManagedObjectManagerInternal mom) throws OpenDataException
Annotations
@SuppressWarnings:unchecked
@TraceRegistration
handleAsStringback to summary
private static TypeConverter handleAsString(final EvaluatedClassDeclaration cls)
Annotations
@SuppressWarnings:unchecked
handleClassback to summary
private static TypeConverter handleClass(final EvaluatedClassDeclaration type, final ManagedObjectManagerInternal mom)
Annotations
@TraceRegistration
handleEnumback to summary
private static TypeConverter handleEnum(final EvaluatedClassDeclaration cls)
handleManagedDataback to summary
private static TypeConverter handleManagedData(final EvaluatedClassDeclaration cls, final ManagedObjectManagerInternal mom, final ManagedData md)
Annotations
@TraceRegistration
handleManagedObjectback to summary
private static TypeConverter handleManagedObject(final EvaluatedClassDeclaration type, final ManagedObjectManagerInternal mom, final ManagedObject mo)
Annotations
@TraceRegistration
handleSimpleTypeback to summary
private static TypeConverter handleSimpleType(final EvaluatedType type, final OpenType<T> stype)
initMapsback to summary
private static void initMaps(final OpenType<T> otype, final EvaluatedClassDeclaration... types)
isIdentityback to summary
public boolean isIdentity()

Implements org.glassfish.gmbal.impl.TypeConverter.isIdentity.

Doc from org.glassfish.gmbal.impl.TypeConverter.isIdentity.

Returns true if this TypeConverter is an identity transformation.

makeCompositeTypeback to summary
private static CompositeType makeCompositeType(final EvaluatedClassDeclaration cls, final ManagedObjectManagerInternal mom, final ManagedData md, Collection<AttributeDescriptor> minfos)
Annotations
@TraceRegistration
makeTypeConverterback to summary
public static TypeConverter makeTypeConverter(final EvaluatedType type, final ManagedObjectManagerInternal mom)
Annotations
@TraceRegistration
toManagedEntityback to summary
public abstract Object toManagedEntity(Object obj)

Redeclares org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Doc from org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Convert from a problem-domain Object obj to a managed entity.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.glassfish.gmbal.impl back to summary

private Class TypeConverterImpl.EnumerationAdapter<T>

extends Object
implements Iterator<T>
Class Inheritance
  • java.lang.Object
  • org.glassfish.gmbal.impl.TypeConverterImpl.EnumerationAdapter
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
private final Enumeration<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public T
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enumerationback to summary
private final Enumeration<T> enumeration

Constructor Detail

EnumerationAdapterback to summary
public EnumerationAdapter(final Enumeration<T> en)

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

nextback to summary
public T next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

org.glassfish.gmbal.impl back to summary

private Interface TypeConverterImpl.Table<K, V>

extends Iterable<K>
Known Direct Implementers
org.glassfish.gmbal.impl.TypeConverterImpl.TableMapImpl, org.glassfish.gmbal.impl.TypeConverterImpl.TableDictionaryImpl

Method Summary

Modifier and TypeMethod and Description
public V
get(K key)

Inherited from java.lang.Iterable:
forEachiteratorspliterator

Method Detail

getback to summary
public V get(K key)
org.glassfish.gmbal.impl back to summary

private Class TypeConverterImpl.TableDictionaryImpl<K, V>

extends Object
implements TypeConverterImpl.Table<K, V>
Class Inheritance
  • java.lang.Object
  • org.glassfish.gmbal.impl.TypeConverterImpl.TableDictionaryImpl
All Implemented Interfaces
org.glassfish.gmbal.impl.TypeConverterImpl.Table, java.lang.Iterable

Field Summary

Modifier and TypeField and Description
private final Dictionary<K, V>

Constructor Summary

AccessConstructor and Description
public
TableDictionaryImpl(final Dictionary<K, V> dict)

Method Summary

Modifier and TypeMethod and Description
public V
public Iterator<K>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dictback to summary
private final Dictionary<K, V> dict

Constructor Detail

TableDictionaryImplback to summary
public TableDictionaryImpl(final Dictionary<K, V> dict)

Method Detail

getback to summary
public V get(final K key)

Implements org.glassfish.gmbal.impl.TypeConverterImpl.Table.get.

iteratorback to summary
public Iterator<K> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@SuppressWarnings:unchecked
org.glassfish.gmbal.impl back to summary

private Class TypeConverterImpl.TableMapImpl<K, V>

extends Object
implements TypeConverterImpl.Table<K, V>
Class Inheritance
All Implemented Interfaces
org.glassfish.gmbal.impl.TypeConverterImpl.Table, java.lang.Iterable

Field Summary

Modifier and TypeField and Description
private final Map<K, V>

Constructor Summary

AccessConstructor and Description
public
TableMapImpl(final Map<K, V> map)

Method Summary

Modifier and TypeMethod and Description
public V
public Iterator<K>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mapback to summary
private final Map<K, V> map

Constructor Detail

TableMapImplback to summary
public TableMapImpl(final Map<K, V> map)

Method Detail

getback to summary
public V get(final K key)

Implements org.glassfish.gmbal.impl.TypeConverterImpl.Table.get.

iteratorback to summary
public Iterator<K> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

org.glassfish.gmbal.impl back to summary

private abstract Class TypeConverterImpl.TypeConverterListBase

extends TypeConverterImpl
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final TypeConverter
Inherited from org.glassfish.gmbal.impl.TypeConverterImpl:
dataTypemanagedTypeNULL_STRING

Constructor Summary

AccessConstructor and Description
public
TypeConverterListBase(final EvaluatedType dataType, final TypeConverter memberTc)

Method Summary

Modifier and TypeMethod and Description
protected abstract Iterator<E>
private static ArrayType<T>
makeArrayType(final OpenType<T> ot)

public Object
toManagedEntity(final Object obj)

Implements abstract org.glassfish.gmbal.impl.TypeConverterImpl.toManagedEntity.

Implements org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Convert from a problem-domain Object obj to a managed entity.

Inherited from org.glassfish.gmbal.impl.TypeConverterImpl:
fromManagedEntitygetDataTypegetJavaClassgetJavaClassgetManagedTypeisIdentitymakeTypeConvertertoString

Field Detail

memberTcback to summary
pack-priv final TypeConverter memberTc

Constructor Detail

TypeConverterListBaseback to summary
public TypeConverterListBase(final EvaluatedType dataType, final TypeConverter memberTc)

Method Detail

getIteratorback to summary
protected abstract Iterator<E> getIterator(Object obj)
makeArrayTypeback to summary
private static ArrayType<T> makeArrayType(final OpenType<T> ot)
Annotations
@SuppressWarnings:unchecked
toManagedEntityback to summary
public Object toManagedEntity(final Object obj)

Implements abstract org.glassfish.gmbal.impl.TypeConverterImpl.toManagedEntity.

Implements org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Doc from org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Convert from a problem-domain Object obj to a managed entity.

org.glassfish.gmbal.impl back to summary

private abstract Class TypeConverterImpl.TypeConverterMapBase

extends TypeConverterImpl
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final TypeConverter
private final TypeConverter
Inherited from org.glassfish.gmbal.impl.TypeConverterImpl:
dataTypemanagedTypeNULL_STRING

Constructor Summary

AccessConstructor and Description
public
TypeConverterMapBase(EvaluatedType dataType, TypeConverter keyTypeConverter, TypeConverter valueTypeConverter)

Method Summary

Modifier and TypeMethod and Description
protected abstract TypeConverterImpl.Table<K, V>
private static TabularType
makeMapTabularType(final TypeConverter firstTc, final TypeConverter secondTc)

public Object
toManagedEntity(Object obj)

Implements abstract org.glassfish.gmbal.impl.TypeConverterImpl.toManagedEntity.

Implements org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Convert from a problem-domain Object obj to a managed entity.

Inherited from org.glassfish.gmbal.impl.TypeConverterImpl:
fromManagedEntitygetDataTypegetJavaClassgetJavaClassgetManagedTypeisIdentitymakeTypeConvertertoString

Field Detail

keyTypeConverterback to summary
private final TypeConverter keyTypeConverter
valueTypeConverterback to summary
private final TypeConverter valueTypeConverter

Constructor Detail

TypeConverterMapBaseback to summary
public TypeConverterMapBase(EvaluatedType dataType, TypeConverter keyTypeConverter, TypeConverter valueTypeConverter)

Method Detail

getTableback to summary
protected abstract TypeConverterImpl.Table<K, V> getTable(Object obj)
makeMapTabularTypeback to summary
private static TabularType makeMapTabularType(final TypeConverter firstTc, final TypeConverter secondTc)
toManagedEntityback to summary
public Object toManagedEntity(Object obj)

Implements abstract org.glassfish.gmbal.impl.TypeConverterImpl.toManagedEntity.

Implements org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Doc from org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Convert from a problem-domain Object obj to a managed entity.

Annotations
@SuppressWarnings:unchecked
org.glassfish.gmbal.impl back to summary

public Class TypeConverterImpl.TypeConverterPlaceHolderImpl

extends Object
implements TypeConverter
Class Inheritance
  • java.lang.Object
  • org.glassfish.gmbal.impl.TypeConverterImpl.TypeConverterPlaceHolderImpl
All Implemented Interfaces
org.glassfish.gmbal.impl.TypeConverter

Field Summary

Modifier and TypeField and Description
private EvaluatedType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
fromManagedEntity(Object entity)

Implements org.glassfish.gmbal.impl.TypeConverter.fromManagedEntity.

Convert from a ManagedEntity to a problem-domain Object.

public EvaluatedType
getDataType()

Implements org.glassfish.gmbal.impl.TypeConverter.getDataType.

Java generic type of attribute in problem-domain Object.

public OpenType<T>
getManagedType()

Implements org.glassfish.gmbal.impl.TypeConverter.getManagedType.

Open MBeans Open Type for management domain object.

public boolean
isIdentity()

Implements org.glassfish.gmbal.impl.TypeConverter.isIdentity.

Returns true if this TypeConverter is an identity transformation.

public Object
toManagedEntity(Object obj)

Implements org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Convert from a problem-domain Object obj to a managed entity.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

etback to summary
private EvaluatedType et

Constructor Detail

TypeConverterPlaceHolderImplback to summary
public TypeConverterPlaceHolderImpl(EvaluatedType type)

Method Detail

fromManagedEntityback to summary
public Object fromManagedEntity(Object entity)

Implements org.glassfish.gmbal.impl.TypeConverter.fromManagedEntity.

Doc from org.glassfish.gmbal.impl.TypeConverter.fromManagedEntity.

Convert from a ManagedEntity to a problem-domain Object.

getDataTypeback to summary
public EvaluatedType getDataType()

Implements org.glassfish.gmbal.impl.TypeConverter.getDataType.

Doc from org.glassfish.gmbal.impl.TypeConverter.getDataType.

Java generic type of attribute in problem-domain Object.

getManagedTypeback to summary
public OpenType<T> getManagedType()

Implements org.glassfish.gmbal.impl.TypeConverter.getManagedType.

Doc from org.glassfish.gmbal.impl.TypeConverter.getManagedType.

Open MBeans Open Type for management domain object.

isIdentityback to summary
public boolean isIdentity()

Implements org.glassfish.gmbal.impl.TypeConverter.isIdentity.

Doc from org.glassfish.gmbal.impl.TypeConverter.isIdentity.

Returns true if this TypeConverter is an identity transformation.

toManagedEntityback to summary
public Object toManagedEntity(Object obj)

Implements org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Doc from org.glassfish.gmbal.impl.TypeConverter.toManagedEntity.

Convert from a problem-domain Object obj to a managed entity.