com.atlassian.plugins.rest.common.expand
Class SelfExpandingExpander.Resolver
java.lang.Object
com.atlassian.plugins.rest.common.expand.SelfExpandingExpander.Resolver
- All Implemented Interfaces:
- EntityExpanderResolver
- Enclosing class:
- SelfExpandingExpander
public static class SelfExpandingExpander.Resolver
- extends java.lang.Object
- implements EntityExpanderResolver
To use the self expanding mechanism, make sure you register an instance
of this EntityExpanderResolver in your application's
ExpandResponseFilter.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelfExpandingExpander.Resolver
public SelfExpandingExpander.Resolver()
hasExpander
public <T> boolean hasExpander(T instance)
hasExpander
public boolean hasExpander(java.lang.Class<?> aClass)
- Description copied from interface:
EntityExpanderResolver
- Tells whether this resolver can get an expander for the given instance.
- Specified by:
hasExpander in interface EntityExpanderResolver
- Parameters:
aClass - 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(T instance)
getExpander
public <T> EntityExpander<T> getExpander(java.lang.Class<? extends T> aClass)
- Description copied from interface:
EntityExpanderResolver
- Gets an
EntityExpander for the given type.
- Specified by:
getExpander in interface EntityExpanderResolver
- Type Parameters:
T - the type of object to retrieve the expander for.- Parameters:
aClass - 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.
Copyright © 2014 Atlassian. All Rights Reserved.