org.glassfish.jersey.server.model
Class ResourceClass

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

public class ResourceClass
extends Object
implements PathAnnotated, ResourceModelComponent

Abstraction for resource class


Constructor Summary
ResourceClass(Class<?> resourceClass)
          Creates a new instance of ResourceClass.
ResourceClass(Class<?> resourceClass, PathValue uriPath)
          Creates a new instance of ResourceClass.
ResourceClass(String path, ResourceClass ar)
          Create a new instance from an existing ResourceClass but defining a new path.
 
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.
 List<ResourceModelComponent> getComponents()
          Should return all existing resource model sub-components.
 List<ResourceConstructor> getConstructors()
           
 PathValue getPath()
           
 Class<?> getResourceClass()
           
 List<AbstractResourceMethod> getResourceMethods()
          Provides a non-null list of resource methods available on the resource
 List<SubResourceLocator> getSubResourceLocators()
          Provides a non-null list of subresource locators available on the resource
 List<SubResourceMethod> getSubResourceMethods()
          Provides a non-null list of subresource methods available on the resource
 boolean isRootResource()
           
 boolean isSubResource()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceClass

public ResourceClass(Class<?> resourceClass)
Creates a new instance of ResourceClass.

Parameters:
resourceClass - resource class.

ResourceClass

public ResourceClass(Class<?> resourceClass,
                     @Nullable
                     PathValue uriPath)
Creates a new instance of ResourceClass.

Parameters:
resourceClass - resource class.
uriPath - path associated with created resource.

ResourceClass

public ResourceClass(String path,
                     ResourceClass ar)
Create a new instance from an existing ResourceClass but defining a new path.

Parameters:
path - the path.
ar - the existing abstract resource.
Method Detail

getResourceClass

public Class<?> getResourceClass()

isSubResource

public boolean isSubResource()

isRootResource

public boolean isRootResource()

getPath

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

getConstructors

public List<ResourceConstructor> getConstructors()

getResourceMethods

public List<AbstractResourceMethod> getResourceMethods()
Provides a non-null list of resource methods available on the resource

Returns:
non-null abstract resource method list

getSubResourceMethods

public List<SubResourceMethod> getSubResourceMethods()
Provides a non-null list of subresource methods available on the resource

Returns:
non-null abstract subresource method list

getSubResourceLocators

public List<SubResourceLocator> getSubResourceLocators()
Provides a non-null list of subresource locators available on the resource

Returns:
non-null abstract subresource locator list

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 Object

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


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