Package org.openjdk.jmc.common.item
Class CanonicalAccessorFactory<V>
- java.lang.Object
-
- org.openjdk.jmc.common.item.AccessorKey<V>
-
- org.openjdk.jmc.common.item.CanonicalAccessorFactory<V>
-
- All Implemented Interfaces:
IAccessorFactory<V>
,IAccessorKey<V>
,ICanonicalAccessorFactory<V>
- Direct Known Subclasses:
Attribute
class CanonicalAccessorFactory<V> extends AccessorKey<V> implements ICanonicalAccessorFactory<V>
-
-
Constructor Summary
Constructors Constructor Description CanonicalAccessorFactory(java.lang.String identifier, ContentType<V> contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <U> IMemberAccessor<V,U>
customAccessor(IType<U> type)
Override to construct deriving accessors.<U> IMemberAccessor<V,U>
getAccessor(IType<U> type)
Gets the accessor for specified type.IAccessorKey<V>
getKey()
-
Methods inherited from class org.openjdk.jmc.common.item.AccessorKey
equals, getContentType, getIdentifier, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openjdk.jmc.common.item.ICanonicalAccessorFactory
getContentType, getIdentifier
-
-
-
-
Constructor Detail
-
CanonicalAccessorFactory
public CanonicalAccessorFactory(java.lang.String identifier, ContentType<V> contentType)
-
-
Method Detail
-
getAccessor
public final <U> IMemberAccessor<V,U> getAccessor(IType<U> type)
Description copied from interface:IAccessorFactory
Gets the accessor for specified type.- Specified by:
getAccessor
in interfaceIAccessorFactory<V>
- Specified by:
getAccessor
in interfaceICanonicalAccessorFactory<V>
- Type Parameters:
U
- input type class- Parameters:
type
- type that the accessor should work for- Returns:
- a member accessor or
null
if the type cannot provide such values
-
customAccessor
public <U> IMemberAccessor<V,U> customAccessor(IType<U> type)
Override to construct deriving accessors. This will only be called when the type does not directly provide the attribute itself.- Type Parameters:
U
- input type class- Parameters:
type
- type to create accessor for- Returns:
- an accessor that works for the specified type or null if it can't be created
-
getKey
public IAccessorKey<V> getKey()
- Specified by:
getKey
in interfaceICanonicalAccessorFactory<V>
-
-