org.glassfish.jersey.server.model
Class ResourceMethod

java.lang.Object
  extended by org.glassfish.jersey.server.model.AbstractResourceMethod
      extended by org.glassfish.jersey.server.model.ResourceMethod
All Implemented Interfaces:
ConsumesProducesEnabledComponent, InvocableResourceMethod, Parameterized, ResourceModelComponent, SuspendableComponent

public class ResourceMethod
extends AbstractResourceMethod
implements Parameterized, InvocableResourceMethod

Abstraction for a resource method


Constructor Summary
ResourceMethod(ResourceClass resource, Method method, Class returnType, Type genericReturnType, String httpMethod, Annotation[] markers)
           
 
Method Summary
 void accept(ResourceModelVisitor visitor)
          A component should call the visitor back with an appropriate visitor interface method to give it a chance to process.
 Type getGenericReturnType()
          Getter for the method generic return type
 Method getMethod()
          Getter for the Java method
 List<Parameter> getParameters()
          Provides access to all parameters associated with given Parameterized instance.
 Class<?> getReturnType()
          Getter for the method return type
 boolean hasEntity()
          Provides information on presence of an entity parameter.
 String toString()
           
 
Methods inherited from class org.glassfish.jersey.server.model.AbstractResourceMethod
areInputTypesDeclared, areOutputTypesDeclared, declareSuspend, getComponents, getDeclaringResource, getHttpMethod, getSupportedInputTypes, getSupportedOutputTypes, getSuspendTimeout, getSuspendTimeoutUnit, isSuspendDeclared, setAreInputTypesDeclared, setAreOutputTypesDeclared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.glassfish.jersey.server.model.InvocableResourceMethod
getDeclaringResource
 
Methods inherited from interface org.glassfish.jersey.server.model.ConsumesProducesEnabledComponent
areInputTypesDeclared, areOutputTypesDeclared, getSupportedInputTypes, getSupportedOutputTypes, setAreInputTypesDeclared, setAreOutputTypesDeclared
 
Methods inherited from interface org.glassfish.jersey.server.model.SuspendableComponent
declareSuspend, getSuspendTimeout, getSuspendTimeoutUnit, isSuspendDeclared
 

Constructor Detail

ResourceMethod

public ResourceMethod(ResourceClass resource,
                      Method method,
                      Class returnType,
                      Type genericReturnType,
                      String httpMethod,
                      Annotation[] markers)
Method Detail

getMethod

public Method getMethod()
Description copied from interface: InvocableResourceMethod
Getter for the Java method

Specified by:
getMethod in interface InvocableResourceMethod
Returns:
corresponding Java method

getReturnType

public Class<?> getReturnType()
Description copied from interface: InvocableResourceMethod
Getter for the method return type

Specified by:
getReturnType in interface InvocableResourceMethod
Returns:
corresponding Java method return type

getGenericReturnType

public Type getGenericReturnType()
Description copied from interface: InvocableResourceMethod
Getter for the method generic return type

Specified by:
getGenericReturnType in interface InvocableResourceMethod
Returns:
corresponding Java method generic return type

hasEntity

public boolean hasEntity()
Description copied from interface: Parameterized
Provides information on presence of an entity parameter.

Specified by:
hasEntity in interface Parameterized
Returns:
true if entity parameter is present, false otherwise

getParameters

public List<Parameter> getParameters()
Description copied from interface: Parameterized
Provides access to all parameters associated with given Parameterized instance.

Specified by:
getParameters in interface Parameterized
Returns:
list of actual parameters

accept

public void accept(ResourceModelVisitor visitor)
Description copied from interface: ResourceModelComponent
A component should call the visitor back with an appropriate visitor interface method to give it a chance to process.

Specified by:
accept in interface ResourceModelComponent
Parameters:
visitor - resource model visitor.

toString

public String toString()
Overrides:
toString in class AbstractResourceMethod


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.