org.nakedobjects.metamodel.java5
Class AnnotationBasedFacetFactoryAbstract

java.lang.Object
  extended by org.nakedobjects.metamodel.facets.FacetFactoryAbstract
      extended by org.nakedobjects.metamodel.java5.AnnotationBasedFacetFactoryAbstract
All Implemented Interfaces:
FacetFactory, AnnotationBasedFacetFactory, SpecificationLoaderAware
Direct Known Subclasses:
ActionOrderAnnotationFacetFactory, AggregatedAnnotationFacetFactory, BoundedAnnotationFacetFactory, DebugAnnotationFacetFactory, DefaultedAnnotationFacetFactory, DescribedAsAnnotationFacetFactory, DisabledAnnotationFacetFactory, EncodableAnnotationFacetFactory, ExecutedAnnotationFacetFactory, ExplorationAnnotationFacetFactory, FacetsAnnotationFacetFactory, FieldOrderAnnotationFacetFactory, HiddenAnnotationFacetFactory, ImmutableAnnotationFacetFactory, MaskAnnotationFacetFactory, MaxLengthAnnotationFacetFactory, MemberOrderAnnotationFacetFactory, MultiLineAnnotationFacetFactory, MustSatisfySpecificationFacetFactory, NamedAnnotationFacetFactory, NotPersistableAnnotationFacetFactory, NotPersistedAnnotationFacetFactory, OptionalAnnotationFacetFactory, ParseableFacetFactory, PluralAnnotationFacetFactory, RegExAnnotationFacetFactory, RemoveIgnoreAnnotationMethodsFacetFactory, TypeOfAnnotationFacetFactory, TypicalLengthAnnotationFacetFactory, ValueFacetFactory

public abstract class AnnotationBasedFacetFactoryAbstract
extends FacetFactoryAbstract
implements AnnotationBasedFacetFactory


Constructor Summary
AnnotationBasedFacetFactoryAbstract(NakedObjectFeatureType[] featureTypes)
           
 
Method Summary
protected  When decodeWhen(When when)
           
protected
<T extends java.lang.annotation.Annotation>
T
getAnnotation(java.lang.Class<?> cls, java.lang.Class<T> annotationClass)
          Searches for annotation on provided class, and if not found for the superclass.
protected
<T extends java.lang.annotation.Annotation>
T
getAnnotation(java.lang.reflect.Method method, java.lang.Class<T> annotationClass)
          Searches for annotation on provided method, and if not found for any inherited methods up from the superclass.
protected  java.lang.annotation.Annotation[][] getParameterAnnotations(java.lang.reflect.Method method)
          Searches for parameter annotations on provided method, and if not found for any inherited methods up from the superclass.
protected  boolean isAnnotationPresent(java.lang.reflect.Method method, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
          Searches for annotation on provided method, and if not found for any inherited methods up from the superclass.
protected  boolean isString(java.lang.Class<?> cls)
          For convenience of the several annotations that apply only to Strings.
 boolean recognizes(java.lang.reflect.Method method)
          Always returns false; FacetFactorys that look for annotations won't recognize methods with prefixes.
 
Methods inherited from class org.nakedobjects.metamodel.facets.FacetFactoryAbstract
getFeatureTypes, getSpecificationLoader, process, process, processParams, setSpecificationLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationBasedFacetFactoryAbstract

public AnnotationBasedFacetFactoryAbstract(NakedObjectFeatureType[] featureTypes)
Method Detail

recognizes

public boolean recognizes(java.lang.reflect.Method method)
Always returns false; FacetFactorys that look for annotations won't recognize methods with prefixes.


isString

protected boolean isString(java.lang.Class<?> cls)
For convenience of the several annotations that apply only to Strings.


decodeWhen

protected When decodeWhen(When when)

getAnnotation

protected <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<?> cls,
                                                                      java.lang.Class<T> annotationClass)
Searches for annotation on provided class, and if not found for the superclass.

Added to allow bytecode-mangling libraries such as CGLIB to be supported.


getAnnotation

protected <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.reflect.Method method,
                                                                      java.lang.Class<T> annotationClass)
Searches for annotation on provided method, and if not found for any inherited methods up from the superclass.

Added to allow bytecode-mangling libraries such as CGLIB to be supported.


isAnnotationPresent

protected boolean isAnnotationPresent(java.lang.reflect.Method method,
                                      java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Searches for annotation on provided method, and if not found for any inherited methods up from the superclass.

Added to allow bytecode-mangling libraries such as CGLIB to be supported.


getParameterAnnotations

protected java.lang.annotation.Annotation[][] getParameterAnnotations(java.lang.reflect.Method method)
Searches for parameter annotations on provided method, and if not found for any inherited methods up from the superclass.

Added to allow bytecode-mangling libraries such as CGLIB to be supported.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.