org.jboss.resteasy.spi.touri.AbstractURITemplateAnnotationResolver Maven / Gradle / Ivy
package org.jboss.resteasy.spi.touri;
import org.jboss.resteasy.resteasy_jaxrs.i18n.Messages;
import org.jboss.resteasy.specimpl.ResteasyUriBuilder;
import org.jboss.resteasy.util.AnnotationResolver;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public abstract class AbstractURITemplateAnnotationResolver implements
URIResolver
{
@SuppressWarnings("unchecked")
public boolean handles(Class type)
{
return AnnotationResolver.getClassWithAnnotation(type, getAnnotationType()) != null;
}
@SuppressWarnings("unchecked")
public String resolveURI(Object object)
{
Class extends Object> clazz = AnnotationResolver
.getClassWithAnnotation(object.getClass(), getAnnotationType());
ResteasyUriBuilder uriBuilderImpl = getUriBuilder(clazz);
Map descriptors = getPropertyDescriptors(clazz);
List