public class StorablePropertyAdapter
extends java.lang.Object
adapter
annotation applied to a property.Constructor and Description |
---|
StorablePropertyAdapter(java.lang.String propertyName,
java.lang.Class<?> propertyType,
java.lang.Class<? extends java.lang.annotation.Annotation> adapterType)
Construct a generic StorablePropertyAdapter instance not attached to a
storable definition.
|
Modifier and Type | Method and Description |
---|---|
java.lang.reflect.Method |
findAdaptMethod(java.lang.Class from,
java.lang.Class to)
Returns an adapt method that supports the given conversion, or null if
none.
|
java.lang.reflect.Method[] |
findAdaptMethodsFrom(java.lang.Class from)
Returns all the adapt methods that convert from the given type.
|
java.lang.reflect.Method[] |
findAdaptMethodsTo(java.lang.Class to)
Returns all the adapt methods that convert to the given type.
|
java.lang.reflect.Constructor |
getAdapterConstructor()
Returns the constructor for the adapter class.
|
java.lang.Object |
getAdapterInstance()
Returns an instance of the adapter, for which an adapt method is applied to.
|
java.lang.reflect.Method |
getAdaptMethod(int index)
Returns a specific adapt method.
|
int |
getAdaptMethodCount()
Returns the count of all defined adapt methods.
|
java.lang.reflect.Method[] |
getAdaptMethods()
Returns a new array with all the adapt methods in it.
|
StorablePropertyAnnotation |
getAnnotation()
Returns the annotation that applied this adapter, or null if none.
|
java.lang.Class[] |
getStorageTypePreferences()
Returns the adapter's storage type preferences.
|
public StorablePropertyAdapter(java.lang.String propertyName, java.lang.Class<?> propertyType, java.lang.Class<? extends java.lang.annotation.Annotation> adapterType)
StorableProperty.getAdapter()
to gain
access to adapter information on actual storable definitions.propertyName
- name of property with adapterpropertyType
- declated type of adapted propertyadapterType
- adapter typejava.lang.IllegalArgumentException
- if adapterType is not an adapter
definition.public StorablePropertyAnnotation getAnnotation()
public java.lang.reflect.Constructor getAdapterConstructor()
(Class type, String propertyName, Annotation)
, where
Annotation is the fully resolved annotation.public java.lang.Object getAdapterInstance()
public java.lang.Class[] getStorageTypePreferences()
public java.lang.reflect.Method findAdaptMethod(java.lang.Class from, java.lang.Class to)
public java.lang.reflect.Method[] findAdaptMethodsFrom(java.lang.Class from)
public java.lang.reflect.Method[] findAdaptMethodsTo(java.lang.Class to)
public int getAdaptMethodCount()
public java.lang.reflect.Method getAdaptMethod(int index) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
public java.lang.reflect.Method[] getAdaptMethods()
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.