use of com.pushtorefresh.storio.contentresolver.annotations.StorIOContentResolverType in project storio by pushtorefresh.
the class StorIOContentResolverProcessor method processAnnotatedClass.
/**
* Processes annotated class
*
* @param classElement type element annotated with {@link StorIOContentResolverType}
* @param elementUtils utils for working with elementUtils
* @return result of processing as {@link StorIOContentResolverTypeMeta}
*/
@NotNull
@Override
protected StorIOContentResolverTypeMeta processAnnotatedClass(@NotNull TypeElement classElement, @NotNull Elements elementUtils) {
final StorIOContentResolverType storIOContentResolverType = classElement.getAnnotation(StorIOContentResolverType.class);
final String commonUri = storIOContentResolverType.uri();
final Map<String, String> urisForOperations = new HashMap<String, String>(3);
urisForOperations.put("insert", storIOContentResolverType.insertUri());
urisForOperations.put("update", storIOContentResolverType.updateUri());
urisForOperations.put("delete", storIOContentResolverType.deleteUri());
validateUris(classElement, commonUri, urisForOperations);
final String simpleName = classElement.getSimpleName().toString();
final String packageName = elementUtils.getPackageOf(classElement).getQualifiedName().toString();
return new StorIOContentResolverTypeMeta(simpleName, packageName, storIOContentResolverType);
}
Aggregations