List<? extends TypeMirror> superTypes = applications.getProcessingContext().directSupertypes((TypeMirror)provider.asType());
if (superTypes.size() > 0) {
TypeMirror superType = superTypes.get(0);
if (superType.getKind() == TypeKind.DECLARED) {
DeclaredType declaredTypeSuper = (DeclaredType)superType;
TypeElement declaredSuperElement = (TypeElement)declaredTypeSuper.asElement();
if (ValueType.class.getName().equals(declaredSuperElement.getQualifiedName().toString())) {
TypeMirror argument = declaredTypeSuper.getTypeArguments().get(0);
if (argument instanceof DeclaredType) {
DeclaredType declaredArgumentType = (DeclaredType)argument;
Element declaredArgumentElement = declaredArgumentType.asElement();