|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.verifier.strategy.AbstractVerifier
Abstract superclass for verifiers containing a bunch of useful methods.
VerificationStrategy
(src) Field Summary | |
static java.lang.String |
BEAN_MANAGED_TX
|
protected java.lang.ClassLoader |
classloader
The application classloader. |
static java.lang.String |
CONTAINER_MANAGED_TX
|
protected static java.lang.String |
CREATE_METHOD
|
protected static java.lang.String |
EJB_CREATE_METHOD
|
protected static java.lang.String |
EJB_HOME_INTERFACE
|
protected static java.lang.String |
EJB_HOME_METHOD
|
protected static java.lang.String |
EJB_LOCAL_HOME_INTERFACE
|
protected static java.lang.String |
EJB_LOCAL_OBJECT_INTERFACE
|
protected static java.lang.String |
EJB_OBJECT_INTERFACE
|
protected static java.lang.String |
EJB_REMOVE_METHOD
|
protected static java.lang.String |
EJB_SELECT_METHOD
|
static java.lang.String |
STATEFUL_SESSION
|
static java.lang.String |
STATELESS_SESSION
|
Constructor Summary | |
AbstractVerifier(VerificationContext (src) context)
CONSTRUCTORS |
Method Summary | |
void |
checkMessageBean(MessageDrivenMetaData (src) bean)
Provides an empty default implementation for EJB 1.1 verifier (message beans are for EJB 2.0 and greater only). |
protected void |
fireBeanVerifiedEvent(BeanMetaData (src) bean)
|
protected void |
fireBeanVerifiedEvent(BeanMetaData (src) bean,
java.lang.String msg)
|
protected void |
fireSpecViolationEvent(BeanMetaData (src) bean,
java.lang.reflect.Method method,
Section (src) section)
|
protected void |
fireSpecViolationEvent(BeanMetaData (src) bean,
Section (src) section)
|
StrategyContext |
getContext()
Returns the context object reference for this strategy implementation. |
java.util.Iterator |
getCreateMethods(java.lang.Class c)
Return all create methods of a class |
java.lang.reflect.Method |
getDefaultCreateMethod(java.lang.Class c)
|
java.util.Iterator |
getEJBCreateMethods(java.lang.Class c)
Returns the ejbCreate(...) methods of a bean |
java.lang.reflect.Method |
getEJBFindByPrimaryKey(java.lang.Class c)
Returns the ejbFindByPrimaryKey method |
java.util.Iterator |
getEJBFindMethods(java.lang.Class c)
returns the ejbFind |
java.util.Iterator |
getFinderMethods(java.lang.Class home)
returns the finder methods of a home interface |
java.lang.reflect.Method |
getMatchingEJBCreate(java.lang.Class bean,
java.lang.reflect.Method create)
|
java.lang.reflect.Method |
getMatchingEJBFind(java.lang.Class bean,
java.lang.reflect.Method finder)
|
java.lang.reflect.Method |
getMatchingEJBPostCreate(java.lang.Class bean,
java.lang.reflect.Method create)
|
abstract java.lang.String |
getMessageBundle()
|
java.util.Iterator |
getOnMessageMethods(java.lang.Class c)
Returns the onMessage(...) method of a bean |
boolean |
hasANonStaticField(java.lang.Class c)
Checks for at least one non-static field. |
boolean |
hasCreateMethod(java.lang.Class c)
Searches for an instance of a public create method from the class |
boolean |
hasDefaultConstructor(java.lang.Class c)
Checks if a class has a default (no args) constructor |
boolean |
hasDefaultCreateMethod(java.lang.Class home)
Searches the class or interface, and its superclass or superinterface for a create() method that takes no arguments |
boolean |
hasEJBCreateMethod(java.lang.Class c,
boolean isSession)
Searches for an instance of a public ejbCreate method from the class |
boolean |
hasEJBFindByPrimaryKey(java.lang.Class c)
checks if the class has an ejbFindByPrimaryKey method |
boolean |
hasEJBHomeInterface(java.lang.Class c)
Finds javax.ejb.EJBHome interface from the class or its superclasses |
boolean |
hasEJBLocalHomeInterface(java.lang.Class c)
Finds javax.ejb.EJBLocalHome interface from the class or its superclasses |
boolean |
hasEJBLocalObjectInterface(java.lang.Class c)
Finds java.ejb.EJBLocalObject interface from the class |
boolean |
hasEJBObjectInterface(java.lang.Class c)
Finds java.ejb.EJBObject interface from the class |
boolean |
hasEntityBeanInterface(java.lang.Class c)
Finds java.ejb.EntityBean interface from the class |
boolean |
hasFinalizer(java.lang.Class c)
Checks of the class defines a finalize() method |
boolean |
hasFinderMethod(java.lang.Class c)
check if a class has one or more finder methods |
boolean |
hasLegalRMIIIOPArguments(java.lang.reflect.Method method)
|
boolean |
hasLegalRMIIIOPExceptionTypes(java.lang.reflect.Method method)
|
boolean |
hasLegalRMIIIOPReturnType(java.lang.reflect.Method method)
|
boolean |
hasLocalReturnType(BeanMetaData (src) bean,
java.lang.reflect.Method m)
checks the return type of method matches the bean's local interface |
boolean |
hasMatchingEJBCreate(java.lang.Class bean,
java.lang.reflect.Method create)
|
boolean |
hasMatchingEJBFind(java.lang.Class bean,
java.lang.reflect.Method finder)
|
boolean |
hasMatchingEJBHome(java.lang.Class bean,
java.lang.reflect.Method home)
|
boolean |
hasMatchingEJBPostCreate(java.lang.Class bean,
java.lang.reflect.Method create)
Check whether a bean has a matching ejbPostCreate methods for a given ejbCreate method |
boolean |
hasMatchingExceptions(java.lang.reflect.Method source,
java.lang.reflect.Method target)
Check whether two given methods declare the same Exceptions |
boolean |
hasMatchingMethod(java.lang.Class bean,
java.lang.reflect.Method method)
Check if a class (or its superclasses) declare a given method |
boolean |
hasMatchingReturnType(java.lang.reflect.Method a,
java.lang.reflect.Method b)
Check whether two methods have the same return type |
boolean |
hasMessageDrivenBeanInterface(java.lang.Class c)
Finds java.ejb.MessageDrivenBean interface from the class |
boolean |
hasMessageListenerInterface(java.lang.Class c)
Finds javax.jms.MessageListener interface from the class |
boolean |
hasMoreThanOneCreateMethods(java.lang.Class c)
Check whether a class has more than one create method |
boolean |
hasNoArguments(java.lang.reflect.Method method)
checks if the method accepts any parameters. |
boolean |
hasOnMessageMethod(java.lang.Class c)
Searches for an instance of a public onMessage method from the class |
boolean |
hasPrimaryKeyReturnType(EntityMetaData (src) entity,
java.lang.reflect.Method m)
checks the return type of method matches the entity's primary key class or is a super class of the primary key class |
boolean |
hasRemoteReturnType(BeanMetaData (src) bean,
java.lang.reflect.Method m)
checks the return type of method matches the bean's remote interface |
boolean |
hasSessionBeanInterface(java.lang.Class c)
Finds java.ejb.SessionBean interface from the class |
boolean |
hasSessionSynchronizationInterface(java.lang.Class c)
Finds javax.ejb.SessionSynchronization interface from the class |
boolean |
hasSingleArgument(java.lang.reflect.Method method,
java.lang.Class argClass)
checks if the method accepts a single parameter of a specified type. |
boolean |
hasVoidReturnType(java.lang.reflect.Method method)
checks if a method has a void return type |
boolean |
isAbstract(java.lang.Class c)
checks if the given class is declared as abstract |
boolean |
isAbstract(java.lang.reflect.Method m)
checks if the given method is declared as abstract |
boolean |
isAllFieldsPublic(java.lang.Class c)
Checks whether all the fields in the class are declared as public. |
boolean |
isAssignableFrom(java.lang.Class clazz,
java.lang.String assignableFromClassName)
|
boolean |
isAssignableFrom(java.lang.String className,
java.lang.Class assignableFromClass)
|
abstract boolean |
isCreateMethod(java.lang.reflect.Method m)
|
abstract boolean |
isEjbCreateMethod(java.lang.reflect.Method m)
|
boolean |
isFinal(java.lang.Class c)
checks if the given class is declared as final |
boolean |
isFinal(java.lang.reflect.Member member)
checks if a class's member (method, constructor or field) has a final modifier. |
boolean |
isFinderMethod(java.lang.reflect.Method m)
Check if this is a finder method |
boolean |
isMultiObjectFinder(java.lang.reflect.Method f)
checks if finder method returns either Collection or Enumeration |
boolean |
isOnMessageMethod(java.lang.reflect.Method m)
Check if the given message is the onMessage() method |
boolean |
isPublic(java.lang.Class c)
checks if the given class is declared as public |
boolean |
isPublic(java.lang.reflect.Member member)
checks if a class's member (method, constructor or field) has a public modifier. |
protected boolean |
isRMIIDLValueType(java.lang.Class type)
|
protected boolean |
isRMIIIOPType(java.lang.Class type)
|
boolean |
isSingleObjectFinder(EntityMetaData (src) entity,
java.lang.reflect.Method finder)
checks if finder returns the primary key type |
boolean |
isStatic(java.lang.Class c)
checks if the given class is declared as static (inner classes only) |
boolean |
isStatic(java.lang.reflect.Member member)
checks if a class's member (method, constructor or field) has a static modifier. |
boolean |
throwsCreateException(java.lang.reflect.Method method)
checks if the method includes java.ejb.CreateException in its throws clause. |
boolean |
throwsFinderException(java.lang.reflect.Method method)
checks if the methods includes javax.ejb.FinderException in its throws clause. |
boolean |
throwsNoException(java.lang.reflect.Method method)
checks if the method throws no checked exceptions in its throws clause. |
boolean |
throwsRemoteException(java.lang.reflect.Method method)
Checks if the method includes java.rmi.RemoteException or its subclass in its throws clause. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.verifier.strategy.VerificationStrategy (src) |
checkEntity, checkSession |
Field Detail |
protected static final java.lang.String EJB_OBJECT_INTERFACE
protected static final java.lang.String EJB_HOME_INTERFACE
protected static final java.lang.String EJB_LOCAL_OBJECT_INTERFACE
protected static final java.lang.String EJB_LOCAL_HOME_INTERFACE
protected java.lang.ClassLoader classloader
VerificationContext.getClassLoader()
method, or
constructed by this object by creating a classloader to the URL
returned by VerificationContext.getJarLocation()
method. Initialized in the constructor.
public static final java.lang.String BEAN_MANAGED_TX
public static final java.lang.String CONTAINER_MANAGED_TX
public static final java.lang.String STATEFUL_SESSION
public static final java.lang.String STATELESS_SESSION
protected static final java.lang.String EJB_CREATE_METHOD
protected static final java.lang.String EJB_REMOVE_METHOD
protected static final java.lang.String CREATE_METHOD
protected static final java.lang.String EJB_HOME_METHOD
protected static final java.lang.String EJB_SELECT_METHOD
Constructor Detail |
public AbstractVerifier(VerificationContext (src) context)
Method Detail |
public boolean isAssignableFrom(java.lang.String className, java.lang.Class assignableFromClass)
public boolean isAssignableFrom(java.lang.Class clazz, java.lang.String assignableFromClassName)
public abstract java.lang.String getMessageBundle()
public abstract boolean isCreateMethod(java.lang.reflect.Method m)
public abstract boolean isEjbCreateMethod(java.lang.reflect.Method m)
public boolean hasLegalRMIIIOPArguments(java.lang.reflect.Method method)
public boolean hasLegalRMIIIOPReturnType(java.lang.reflect.Method method)
public boolean hasLegalRMIIIOPExceptionTypes(java.lang.reflect.Method method)
public boolean throwsRemoteException(java.lang.reflect.Method method)
public boolean hasSingleArgument(java.lang.reflect.Method method, java.lang.Class argClass)
public boolean hasNoArguments(java.lang.reflect.Method method)
public boolean throwsNoException(java.lang.reflect.Method method)
public boolean throwsCreateException(java.lang.reflect.Method method)
public boolean throwsFinderException(java.lang.reflect.Method method)
public boolean isStatic(java.lang.reflect.Member member)
static
modifier.
public boolean isStatic(java.lang.Class c)
public boolean isFinal(java.lang.reflect.Member member)
final
modifier.
public boolean isFinal(java.lang.Class c)
public boolean isPublic(java.lang.reflect.Member member)
public
modifier.
public boolean isPublic(java.lang.Class c)
public
public boolean isAllFieldsPublic(java.lang.Class c)
public boolean isAbstract(java.lang.Class c)
public boolean isAbstract(java.lang.reflect.Method m)
public boolean isSingleObjectFinder(EntityMetaData (src) entity, java.lang.reflect.Method finder)
public boolean isMultiObjectFinder(java.lang.reflect.Method f)
public boolean hasRemoteReturnType(BeanMetaData (src) bean, java.lang.reflect.Method m)
public boolean hasLocalReturnType(BeanMetaData (src) bean, java.lang.reflect.Method m)
public boolean hasVoidReturnType(java.lang.reflect.Method method)
public boolean hasMessageDrivenBeanInterface(java.lang.Class c)
public boolean hasMessageListenerInterface(java.lang.Class c)
public boolean hasSessionBeanInterface(java.lang.Class c)
public boolean hasEntityBeanInterface(java.lang.Class c)
public boolean hasEJBObjectInterface(java.lang.Class c)
public boolean hasEJBLocalObjectInterface(java.lang.Class c)
public boolean hasEJBHomeInterface(java.lang.Class c)
public boolean hasEJBLocalHomeInterface(java.lang.Class c)
public boolean hasSessionSynchronizationInterface(java.lang.Class c)
public boolean hasDefaultConstructor(java.lang.Class c)
public boolean hasFinalizer(java.lang.Class c)
public boolean hasFinderMethod(java.lang.Class c)
public boolean isFinderMethod(java.lang.reflect.Method m)
public boolean isOnMessageMethod(java.lang.reflect.Method m)
public boolean hasANonStaticField(java.lang.Class c)
public boolean hasOnMessageMethod(java.lang.Class c)
public boolean hasCreateMethod(java.lang.Class c)
public boolean hasEJBCreateMethod(java.lang.Class c, boolean isSession)
public boolean hasDefaultCreateMethod(java.lang.Class home)
public boolean hasEJBFindByPrimaryKey(java.lang.Class c)
public boolean hasPrimaryKeyReturnType(EntityMetaData (src) entity, java.lang.reflect.Method m)
public java.lang.reflect.Method getDefaultCreateMethod(java.lang.Class c)
null
if none is foundpublic java.lang.reflect.Method getEJBFindByPrimaryKey(java.lang.Class c)
public java.util.Iterator getEJBFindMethods(java.lang.Class c)
public java.util.Iterator getFinderMethods(java.lang.Class home)
public java.util.Iterator getOnMessageMethods(java.lang.Class c)
public java.util.Iterator getEJBCreateMethods(java.lang.Class c)
public java.util.Iterator getCreateMethods(java.lang.Class c)
public boolean hasMoreThanOneCreateMethods(java.lang.Class c)
public boolean hasMatchingExceptions(java.lang.reflect.Method source, java.lang.reflect.Method target)
public boolean hasMatchingMethod(java.lang.Class bean, java.lang.reflect.Method method)
public boolean hasMatchingReturnType(java.lang.reflect.Method a, java.lang.reflect.Method b)
public boolean hasMatchingEJBPostCreate(java.lang.Class bean, java.lang.reflect.Method create)
public boolean hasMatchingEJBCreate(java.lang.Class bean, java.lang.reflect.Method create)
public java.lang.reflect.Method getMatchingEJBPostCreate(java.lang.Class bean, java.lang.reflect.Method create)
public java.lang.reflect.Method getMatchingEJBCreate(java.lang.Class bean, java.lang.reflect.Method create)
public boolean hasMatchingEJBFind(java.lang.Class bean, java.lang.reflect.Method finder)
public java.lang.reflect.Method getMatchingEJBFind(java.lang.Class bean, java.lang.reflect.Method finder)
public boolean hasMatchingEJBHome(java.lang.Class bean, java.lang.reflect.Method home)
protected void fireSpecViolationEvent(BeanMetaData (src) bean, Section (src) section)
protected void fireSpecViolationEvent(BeanMetaData (src) bean, java.lang.reflect.Method method, Section (src) section)
protected final void fireBeanVerifiedEvent(BeanMetaData (src) bean)
protected final void fireBeanVerifiedEvent(BeanMetaData (src) bean, java.lang.String msg)
public void checkMessageBean(MessageDrivenMetaData (src) bean)
checkMessageBean
in interface VerificationStrategy (src)
bean
- the message bean to verifypublic StrategyContext getContext()
protected boolean isRMIIIOPType(java.lang.Class type)
protected boolean isRMIIDLValueType(java.lang.Class type)
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |