org.jboss.wsf.common.injection.finders
Class ResourceMethodFinder
java.lang.Object
org.jboss.wsf.common.reflection.AccessibleObjectProcessorAdapter<A>
org.jboss.wsf.common.reflection.AbstractClassProcessor<AO>
org.jboss.wsf.common.reflection.AbstractAnnotatedClassProcessor<java.lang.reflect.Method,A>
org.jboss.wsf.common.reflection.AnnotatedMethodFinder<javax.annotation.Resource>
org.jboss.wsf.common.injection.finders.ResourceMethodFinder
- All Implemented Interfaces:
- AccessibleObjectProcessor<java.lang.reflect.Method>, AnnotationAware<javax.annotation.Resource>, ClassProcessor<java.lang.reflect.Method>
public final class ResourceMethodFinder
- extends AnnotatedMethodFinder<javax.annotation.Resource>
Setter based resource injection.
To access a resource a developer declares a setter method and annotates it as being a
resource reference. The name and type of resource maybe inferred by inspecting the
method declaration if necessary. The name of the resource, if not declared, is the
name of the JavaBeans property as determined starting from the name of the setter
method in question. The setter method must follow the standard JavaBeans
convention - name starts with a “set”, void return type and only one parameter.
Additionally, the type of the parameter must be compatible with the type specified
as a property of the Resource if present.
- Author:
- Richard Opalka
Method Summary |
boolean |
matches(java.lang.reflect.Method method)
By default accessible object always matches all criteria. |
void |
validate(java.lang.reflect.Method method)
By default validation of accessible object passes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceMethodFinder
public ResourceMethodFinder(java.lang.Class<?> accept,
boolean include)
- Constructor.
- Parameters:
accept
- filtering classinclude
- whether include/exclude filtering class
validate
public void validate(java.lang.reflect.Method method)
- Description copied from class:
AccessibleObjectProcessorAdapter
- By default validation of accessible object passes.
- Specified by:
validate
in interface AccessibleObjectProcessor<java.lang.reflect.Method>
- Overrides:
validate
in class AccessibleObjectProcessorAdapter<java.lang.reflect.Method>
- Parameters:
method
- object to validate
matches
public boolean matches(java.lang.reflect.Method method)
- Description copied from class:
AccessibleObjectProcessorAdapter
- By default accessible object always matches all criteria.
- Specified by:
matches
in interface AccessibleObjectProcessor<java.lang.reflect.Method>
- Overrides:
matches
in class AbstractAnnotatedClassProcessor<java.lang.reflect.Method,javax.annotation.Resource>
- Parameters:
method
- to check
- Returns:
- true if accessible object matches the criteria, false otherwise
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.