com.atlassian.plugins.rest.common.expand.resolver
Class IdentityEntityExpanderResolver

java.lang.Object
  extended by com.atlassian.plugins.rest.common.expand.resolver.IdentityEntityExpanderResolver
All Implemented Interfaces:
EntityExpanderResolver

public class IdentityEntityExpanderResolver
extends java.lang.Object


Constructor Summary
IdentityEntityExpanderResolver()
           
 
Method Summary
<T> EntityExpander<T>
getExpander(java.lang.Class<? extends T> type)
          Gets an EntityExpander for the given type.
<T> EntityExpander<T>
getExpander(T instance)
          Gets an EntityExpander for the given instance.
 boolean hasExpander(java.lang.Class<?> type)
          Tells whether this resolver can get an expander for the given instance.
<T> boolean
hasExpander(T instance)
          Tells whether this resolver can get an expander for the given instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityEntityExpanderResolver

public IdentityEntityExpanderResolver()
Method Detail

hasExpander

public boolean hasExpander(java.lang.Class<?> type)
Description copied from interface: EntityExpanderResolver
Tells whether this resolver can get an expander for the given instance.

Parameters:
type - the type to resolve the expander for.
Returns:
true if an expander can be found for this object instance, false otherwise.

getExpander

public <T> EntityExpander<T> getExpander(java.lang.Class<? extends T> type)
Description copied from interface: EntityExpanderResolver
Gets an EntityExpander for the given type.

Type Parameters:
T - the type of object to retrieve the expander for.
Parameters:
type - the type of object to look up the expander for.
Returns:
the EntityExpander, null if none could be found. This method will never return null if EntityExpanderResolver.hasExpander(Class) returns true for the same instance.

hasExpander

public final <T> boolean hasExpander(T instance)
Description copied from interface: EntityExpanderResolver
Tells whether this resolver can get an expander for the given instance.

Specified by:
hasExpander in interface EntityExpanderResolver
Parameters:
instance - the object to resolve the expander for.
Returns:
true if an expander can be found for this object instance, false otherwise.

getExpander

public final <T> EntityExpander<T> getExpander(T instance)
Description copied from interface: EntityExpanderResolver
Gets an EntityExpander for the given instance.

Specified by:
getExpander in interface EntityExpanderResolver
Type Parameters:
T - the type of object to retrieve the expander for.
Parameters:
instance - the object to resolve the expander for.
Returns:
the EntityExpander, null if none could be found. This method will never null if EntityExpanderResolver.hasExpander(Object) returns true for the same instance.


Copyright © 2009 Atlassian. All Rights Reserved.