org.glassfish.jersey.server.model
Class SubResourceLocator

java.lang.Object
  extended by org.glassfish.jersey.server.model.SubResourceLocator
All Implemented Interfaces:
Parameterized, PathAnnotated, ResourceModelComponent

public class SubResourceLocator
extends Object
implements PathAnnotated, Parameterized, ResourceModelComponent

Abstraction for a sub-resource locator

Author:
Marc Hadley (marc.hadley at sun.com), Jakub Podlesak (jakub.podlesak at oracle.com)

Constructor Summary
SubResourceLocator(ResourceClass resource, Method method, PathValue uriPath, Annotation[] annotations)
          Creates a new instance of SubResourceLocator
 
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.
 Annotation[] getAnnotations()
           
 List<ResourceModelComponent> getComponents()
          Should return all existing resource model sub-components.
 Method getMethod()
           
 List<Parameter> getParameters()
          Provides access to all parameters associated with given Parameterized instance.
 PathValue getPath()
           
 ResourceClass getResource()
           
 boolean hasEntity()
          Provides information on presence of an entity parameter.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubResourceLocator

public SubResourceLocator(ResourceClass resource,
                          Method method,
                          PathValue uriPath,
                          Annotation[] annotations)
Creates a new instance of SubResourceLocator

Method Detail

getAnnotations

public Annotation[] getAnnotations()

getMethod

public Method getMethod()

getResource

public ResourceClass getResource()

getPath

public PathValue getPath()
Specified by:
getPath in interface PathAnnotated

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

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

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.

getComponents

public List<ResourceModelComponent> getComponents()
Description copied from interface: ResourceModelComponent
Should return all existing resource model sub-components.

Specified by:
getComponents in interface ResourceModelComponent
Returns:
list of all sub-components

toString

public String toString()
Overrides:
toString in class Object


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