View Javadoc

1   package com.atlassian.plugins.rest.common.expand.resolver;
2   
3   import com.atlassian.plugins.rest.common.expand.EntityExpander;
4   import static com.google.common.base.Preconditions.*;
5   
6   abstract class AbstractEntityExpanderResolver implements EntityExpanderResolver
7   {
8       public final <T> boolean hasExpander(T instance)
9       {
10          return hasExpander(checkNotNull(instance).getClass());
11      }
12  
13      @SuppressWarnings("unchecked")
14      public final <T> EntityExpander<T> getExpander(T instance)
15      {
16          return (EntityExpander<T>) getExpander(checkNotNull(instance).getClass());
17      }
18  }