org.compass.core.config.binding.metadata
Interface ClassMetaData

All Known Implementing Classes:
AsmClassMetaData, JavassistClassMetaData, StandardClassMetaData

public interface ClassMetaData

A class meta data interface allowing to access the actual class metadata.

Author:
kimchy

Method Summary
 Map<String,Object> getAnnotationAttributes(String annotationType)
          Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying class).
 Set<String> getAnnotationTypes()
          Return the names of all annotation types defined on the underlying class.
 String getClassName()
          Return the name of the underlying class.
 String getEnclosingClassName()
          Return the name of the enclosing class of the underlying class, or null if the underlying class is a top-level class.
 String[] getInterfaceNames()
          Return the name of all interfaces that the underlying class implements, or an empty array if there are none.
 Set<String> getMetaAnnotationTypes(String annotationType)
          Return the names of all meta-annotation types defined on the given annotation type of the underlying class.
 String getSuperClassName()
          Return the name of the super class of the underlying class, or null if there is no super class defined.
 boolean hasAnnotation(String annotationType)
          Determine whether the underlying class has an annotation of the given type defined.
 boolean hasEnclosingClass()
          Return whether the underlying class has an enclosing class (i.e. the underlying class is an inner/nested class or a local class within a method).
 boolean hasMetaAnnotation(String metaAnnotationType)
          Determine whether the underlying class has an annotation that is itself annotated with the meta-annotation of the given type.
 boolean hasSuperClass()
          Return whether the underlying class has a super class.
 boolean isAbstract()
          Return whether the underlying class is marked as abstract.
 boolean isConcrete()
          Return whether the underlying class represents a concrete class, i.e. neither an interface nor an abstract class.
 boolean isIndependent()
          Determine whether the underlying class is independent, i.e. whether it is a top-level class or a nested class (static inner class) that can be constructed independent from an enclosing class.
 boolean isInterface()
          Return whether the underlying class represents an interface.
 

Method Detail

getClassName

String getClassName()
Return the name of the underlying class.


isInterface

boolean isInterface()
Return whether the underlying class represents an interface.


isAbstract

boolean isAbstract()
Return whether the underlying class is marked as abstract.


isConcrete

boolean isConcrete()
Return whether the underlying class represents a concrete class, i.e. neither an interface nor an abstract class.


isIndependent

boolean isIndependent()
Determine whether the underlying class is independent, i.e. whether it is a top-level class or a nested class (static inner class) that can be constructed independent from an enclosing class.


hasEnclosingClass

boolean hasEnclosingClass()
Return whether the underlying class has an enclosing class (i.e. the underlying class is an inner/nested class or a local class within a method).

If this method returns false, then the underlying class is a top-level class.


getEnclosingClassName

String getEnclosingClassName()
Return the name of the enclosing class of the underlying class, or null if the underlying class is a top-level class.


hasSuperClass

boolean hasSuperClass()
Return whether the underlying class has a super class.


getSuperClassName

String getSuperClassName()
Return the name of the super class of the underlying class, or null if there is no super class defined.


getInterfaceNames

String[] getInterfaceNames()
Return the name of all interfaces that the underlying class implements, or an empty array if there are none.


getAnnotationTypes

Set<String> getAnnotationTypes()
Return the names of all annotation types defined on the underlying class.

Returns:
the annotation type names

hasAnnotation

boolean hasAnnotation(String annotationType)
Determine whether the underlying class has an annotation of the given type defined.

Parameters:
annotationType - the annotation type to look for
Returns:
whether a matching annotation is defined

getMetaAnnotationTypes

Set<String> getMetaAnnotationTypes(String annotationType)
Return the names of all meta-annotation types defined on the given annotation type of the underlying class.

Returns:
the meta-annotation type names

hasMetaAnnotation

boolean hasMetaAnnotation(String metaAnnotationType)
Determine whether the underlying class has an annotation that is itself annotated with the meta-annotation of the given type.

Parameters:
metaAnnotationType - the meta-annotation type to look for
Returns:
whether a matching meta-annotation is defined

getAnnotationAttributes

Map<String,Object> getAnnotationAttributes(String annotationType)
Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying class).

Parameters:
annotationType - the annotation type to look for
Returns:
a Map of attributes, with the attribute name as key (e.g. "value") and the defined attribute value as Map value. This return value will be null if no matching annotation is defined.


Copyright (c) 2004-2008 The Compass Project.