com.bm.introspectors
Class AbstractIntrospector<T>

java.lang.Object
  extended by com.bm.introspectors.AbstractIntrospector<T>
Type Parameters:
T - the type
All Implemented Interfaces:
IIntrospector<T>
Direct Known Subclasses:
MDBIntrospector, SessionBeanIntrospector

public abstract class AbstractIntrospector<T>
extends java.lang.Object
implements IIntrospector<T>

Abstract instrospector fur Session, MDBs und JBoss services.

Since:
24.03.2007
Author:
Daniel Wiese

Field Summary
protected  ClassAnnotationMetadata classMetaData
           
protected  java.lang.Class<? extends T> representingClass
          the class represented by this introspector (e.g.
 
Constructor Summary
AbstractIntrospector(java.lang.Class<? extends T> toInspect)
          Constructor.
 
Method Summary
 java.lang.annotation.Annotation getAnnotationForField(Property field)
          Returns the annotationForField.
 ClassAnnotationMetadata getClassMetaData()
          Returns the classMetaData.
 Property getEntityManagerField()
          Returns the field, which holds the reference to the entity manager.
 java.util.Set<Property> getFieldsToInject()
          Returns the fieldsToInject.
 java.lang.Class<?> getImplementationForInterface(java.lang.Class<?> toInspect)
          Get the implemenation name for the interface.
 java.util.Set<MethodAnnotationMetadata> getLifecycleMethods()
          Returns the lifecycle methods.
 java.lang.Class<? extends T> getRepresentingClass()
          Returns the representingClass.
 boolean hasEntityManager()
          True is the session bean has an entity manager.
protected  void processAccessTypeField(java.lang.Class<? extends T> toInspect)
          If the access type is field, we will extract all the neccessary meta informations from the fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classMetaData

protected ClassAnnotationMetadata classMetaData

representingClass

protected final java.lang.Class<? extends T> representingClass
the class represented by this introspector (e.g. the entity bean)*

Constructor Detail

AbstractIntrospector

public AbstractIntrospector(java.lang.Class<? extends T> toInspect)
Constructor.

Parameters:
toInspect - - the class to inspect.
Method Detail

getAnnotationForField

public java.lang.annotation.Annotation getAnnotationForField(Property field)
Returns the annotationForField.

Specified by:
getAnnotationForField in interface IIntrospector<T>
Parameters:
field - - for field
Returns:
Returns the annotationForField.
See Also:
IIntrospector.getAnnotationForField(com.bm.introspectors.Property)

getClassMetaData

public ClassAnnotationMetadata getClassMetaData()
Returns the classMetaData.

Specified by:
getClassMetaData in interface IIntrospector<T>
Returns:
Returns the classMetaData.
See Also:
IIntrospector.getClassMetaData()

getEntityManagerField

public Property getEntityManagerField()
Returns the field, which holds the reference to the entity manager.

Specified by:
getEntityManagerField in interface IIntrospector<T>
Returns:
- the em field
See Also:
IIntrospector.getEntityManagerField()

getFieldsToInject

public java.util.Set<Property> getFieldsToInject()
Returns the fieldsToInject.

Specified by:
getFieldsToInject in interface IIntrospector<T>
Returns:
Returns the fieldsToInject.
See Also:
IIntrospector.getFieldsToInject()

getImplementationForInterface

public java.lang.Class<?> getImplementationForInterface(java.lang.Class<?> toInspect)
Get the implemenation name for the interface.

Specified by:
getImplementationForInterface in interface IIntrospector<T>
Parameters:
toInspect - interface to whoes implementation to look for
Returns:
the implementation of the parameter interface
See Also:
IIntrospector.getImplementationForInterface(java.lang.Class)

getLifecycleMethods

public java.util.Set<MethodAnnotationMetadata> getLifecycleMethods()
Returns the lifecycle methods.

Specified by:
getLifecycleMethods in interface IIntrospector<T>
Returns:
Returns the lofe cycle methods.
See Also:
IIntrospector.getLifecycleMethods()

getRepresentingClass

public java.lang.Class<? extends T> getRepresentingClass()
Returns the representingClass.

Specified by:
getRepresentingClass in interface IIntrospector<T>
Returns:
Returns the representingClass.
See Also:
IIntrospector.getRepresentingClass()

hasEntityManager

public boolean hasEntityManager()
True is the session bean has an entity manager.

Specified by:
hasEntityManager in interface IIntrospector<T>
Returns:
- true if yes
See Also:
IIntrospector.hasEntityManager()

processAccessTypeField

protected void processAccessTypeField(java.lang.Class<? extends T> toInspect)
If the access type is field, we will extract all the neccessary meta informations from the fields.

Parameters:
toInspect - - the class to inspect


Copyright © 2008. All Rights Reserved.