final boolean isRootResourceClass = (null != rPathAnnotation);
final boolean isEncodedAnotOnClass =
(null != annotatedResourceClass.getAnnotation(Encoded.class));
AbstractResource resource;
if (isRootResourceClass) {
resource = new AbstractResource(resourceClass,
new PathValue(rPathAnnotation.value()));
} else { // just a subresource class
resource = new AbstractResource(resourceClass);
}
workOutConstructorsList(resource, resourceClass.getConstructors(),
isEncodedAnotOnClass);
workOutFieldsList(resource, isEncodedAnotOnClass);
final MethodList methodList = new MethodList(resourceClass);
workOutSetterMethodsList(resource, methodList, isEncodedAnotOnClass);
final Consumes classScopeConsumesAnnotation =
annotatedResourceClass.getAnnotation(Consumes.class);
final Produces classScopeProducesAnnotation =
annotatedResourceClass.getAnnotation(Produces.class);
workOutResourceMethodsList(resource, methodList, isEncodedAnotOnClass,
classScopeConsumesAnnotation, classScopeProducesAnnotation);
workOutSubResourceMethodsList(resource, methodList, isEncodedAnotOnClass,
classScopeConsumesAnnotation, classScopeProducesAnnotation);
workOutSubResourceLocatorsList(resource, methodList, isEncodedAnotOnClass);
workOutPostConstructPreDestroy(resource);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest(ImplMessages.NEW_AR_CREATED_BY_INTROSPECTION_MODELER(
resource.toString()));
}
return resource;
}