Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » verifier » strategy » [javadoc | source]
org.jboss.verifier.strategy
abstract public class: AbstractVerifier [javadoc | source]
java.lang.Object
   org.jboss.verifier.strategy.AbstractVerifier

All Implemented Interfaces:
    VerificationStrategy

Direct Known Subclasses:
    AbstractEJB2xVerifier, EJBVerifier20, EJBVerifier21, EJBVerifier11

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