com.sun.xml.ws.server
Class AbstractInstanceResolver<T>

java.lang.Object
  extended by com.sun.xml.ws.api.server.InstanceResolver<T>
      extended by com.sun.xml.ws.server.AbstractInstanceResolver<T>
Direct Known Subclasses:
AbstractMultiInstanceResolver, SingletonResolver

abstract class AbstractInstanceResolver<T>
extends InstanceResolver<T>

Partial implementation of InstanceResolver with convenience methods to do the resource injection.


Nested Class Summary
protected static class AbstractInstanceResolver.FieldInjectionPlan<T,R>
          Injects to a field.
protected static interface AbstractInstanceResolver.InjectionPlan<T,R>
          Encapsulates which field/method the injection is done, and performs the injection.
protected static class AbstractInstanceResolver.MethodInjectionPlan<T,R>
          Injects to a method.
 
Constructor Summary
AbstractInstanceResolver()
           
 
Method Summary
protected static
<T,R> AbstractInstanceResolver.InjectionPlan<T,R>
buildInjectionPlan(Class<? extends T> clazz, Class<R> resourceType, boolean isStatic)
          Creates an AbstractInstanceResolver.InjectionPlan that injects the given resource type to the given class.
protected  Method findAnnotatedMethod(Class clazz, Class<? extends Annotation> annType)
          Finds the method that has the given annotation, while making sure that there's only at most one such method.
protected static ResourceInjector getResourceInjector(WSEndpoint endpoint)
           
protected static void invokeMethod(Method method, Object instance, Object... args)
          Helper for invoking a method with elevated privilege.
 
Methods inherited from class com.sun.xml.ws.api.server.InstanceResolver
createDefault, createDefault, createInvoker, createNewInstance, createSingleton, dispose, postInvoke, resolve, start, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInstanceResolver

AbstractInstanceResolver()
Method Detail

getResourceInjector

protected static ResourceInjector getResourceInjector(WSEndpoint endpoint)

invokeMethod

protected static void invokeMethod(@Nullable
                                   Method method,
                                   Object instance,
                                   Object... args)
Helper for invoking a method with elevated privilege.


findAnnotatedMethod

@Nullable
protected final Method findAnnotatedMethod(Class clazz,
                                                    Class<? extends Annotation> annType)
Finds the method that has the given annotation, while making sure that there's only at most one such method.


buildInjectionPlan

protected static <T,R> AbstractInstanceResolver.InjectionPlan<T,R> buildInjectionPlan(Class<? extends T> clazz,
                                                                                      Class<R> resourceType,
                                                                                      boolean isStatic)
Creates an AbstractInstanceResolver.InjectionPlan that injects the given resource type to the given class.

Parameters:
isStatic - Only look for static field/method