org.qi4j.api.property
Class GenericPropertyInfo

java.lang.Object
  extended by org.qi4j.api.property.GenericPropertyInfo
All Implemented Interfaces:
Serializable, PropertyInfo

public final class GenericPropertyInfo
extends Object
implements PropertyInfo, Serializable

See Also:
Serialized Form

Constructor Summary
GenericPropertyInfo(Class declaringClass, String accessorName)
           
GenericPropertyInfo(MetaInfo infos, boolean immutable, boolean computed, QualifiedName qualifiedName, Type type)
           
GenericPropertyInfo(Method accessor)
           
 
Method Summary
static Type getPropertyType(Method accessor)
           
static Type getPropertyType(Type methodReturnType)
           
 boolean isComputed()
           
 boolean isImmutable()
           
<T> T
metaInfo(Class<T> infoType)
          Access metadata about the property with a given type.
 String name()
           
 QualifiedName qualifiedName()
          Get the qualified name of the property which is equal to:
:
 Type type()
          Get the type of the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericPropertyInfo

public GenericPropertyInfo(Method accessor)

GenericPropertyInfo

public GenericPropertyInfo(Class declaringClass,
                           String accessorName)

GenericPropertyInfo

public GenericPropertyInfo(MetaInfo infos,
                           boolean immutable,
                           boolean computed,
                           QualifiedName qualifiedName,
                           Type type)
Method Detail

getPropertyType

public static Type getPropertyType(Method accessor)

getPropertyType

public static Type getPropertyType(Type methodReturnType)

metaInfo

public <T> T metaInfo(Class<T> infoType)
Description copied from interface: PropertyInfo
Access metadata about the property with a given type. The info is registered for the property during assembly of the application.

Specified by:
metaInfo in interface PropertyInfo
Parameters:
infoType - the type of the metadata to return
Returns:
a metadata object that implements the requested type or null if none is registered

name

public String name()

qualifiedName

public QualifiedName qualifiedName()
Description copied from interface: PropertyInfo
Get the qualified name of the property which is equal to:
:

Specified by:
qualifiedName in interface PropertyInfo
Returns:
the qualified name of the property

type

public Type type()
Description copied from interface: PropertyInfo
Get the type of the property. If the property is declared as Property then X is returned.

Specified by:
type in interface PropertyInfo
Returns:
the property type

isImmutable

public boolean isImmutable()
Specified by:
isImmutable in interface PropertyInfo

isComputed

public boolean isComputed()
Specified by:
isComputed in interface PropertyInfo