org.metastopheles
Class MetaDataObject

java.lang.Object
  extended by org.metastopheles.MetaDataObject
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BeanMetaData, MethodMetaData, PropertyMetaData

public abstract class MetaDataObject
extends Object
implements Serializable

A MetaDataObject contains data about a particular aspect of a bean class.

Since:
1.0
Author:
James Carman
See Also:
Serialized Form

Constructor Summary
MetaDataObject()
           
 
Method Summary
<A extends Annotation>
A
getAnnotation(Class<A> annotationType)
          Returns the annotation associated with this MetaDataObject's default annotation source.
protected abstract  AnnotatedElement getDefaultAnnotationSource()
          Returns the default source for annotation data for this MetaDataObject.
<T> T
getFacet(FacetKey<T> key)
          Retrieves a facet value associated with this MetaDataObject.
 Set<FacetKey<?>> getFacetKeys()
          Returns a snapshot of the keys of the facets currently associated with this MetaDataObject.
<T> void
setFacet(FacetKey<T> key, T value)
          Associates a facet with this MetaDataObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaDataObject

public MetaDataObject()
Method Detail

getDefaultAnnotationSource

protected abstract AnnotatedElement getDefaultAnnotationSource()
Returns the default source for annotation data for this MetaDataObject.

Returns:
the default source for annotation data for this MetaDataObject

getFacet

public <T> T getFacet(FacetKey<T> key)
Retrieves a facet value associated with this MetaDataObject.

Parameters:
key - the facet key
Returns:
the facet value

getAnnotation

public <A extends Annotation> A getAnnotation(Class<A> annotationType)
Returns the annotation associated with this MetaDataObject's default annotation source.

Parameters:
annotationType - the annotation type
Returns:
the annotation
See Also:
getDefaultAnnotationSource()

getFacetKeys

public Set<FacetKey<?>> getFacetKeys()
Returns a snapshot of the keys of the facets currently associated with this MetaDataObject.

Returns:
a snapshot of the keys of the facets currently associated with this MetaDataObject

setFacet

public <T> void setFacet(FacetKey<T> key,
                         T value)
Associates a facet with this MetaDataObject.

Parameters:
key - the facet key
value - the facet value


Copyright © 2011. All Rights Reserved.