Class ReflectionService

java.lang.Object
io.contextmap.application.ReflectionService
All Implemented Interfaces:
io.contextmap.core.reflection.ObjectToJsonConverter.ObjectToJsonReflection

public class ReflectionService extends Object implements io.contextmap.core.reflection.ObjectToJsonConverter.ObjectToJsonReflection
  • Constructor Details

    • ReflectionService

      public ReflectionService(org.apache.maven.project.MavenProject project)
  • Method Details

    • isClassInSourceDirectory

      public boolean isClassInSourceDirectory(Class<?> type)
    • scanForMethodsAnnotatedWith

      public Set<Method> scanForMethodsAnnotatedWith(String[] annotationClasses) throws Exception
      Throws:
      Exception
    • scanForClassesAnnotatedWith

      public Set<Class<?>> scanForClassesAnnotatedWith(String[] annotationClasses) throws Exception
      Throws:
      Exception
    • scanForClassesImplementingInterface

      public Set<Class<?>> scanForClassesImplementingInterface(String interfaceFQN) throws Exception
      Throws:
      Exception
    • getAnnotation

      public Optional<Annotation> getAnnotation(Class<?> type, String annotationFullyQualifiedName)
      Specified by:
      getAnnotation in interface io.contextmap.core.reflection.ObjectToJsonConverter.ObjectToJsonReflection
    • getAnnotation

      public Optional<Annotation> getAnnotation(Method method, String annotationFullyQualifiedName)
      Specified by:
      getAnnotation in interface io.contextmap.core.reflection.ObjectToJsonConverter.ObjectToJsonReflection
    • getAnnotation

      public Optional<Annotation> getAnnotation(Field field, String annotationFullyQualifiedName)
      Specified by:
      getAnnotation in interface io.contextmap.core.reflection.ObjectToJsonConverter.ObjectToJsonReflection
    • getArgumentsWithAnnotation

      public Map<Parameter,Annotation> getArgumentsWithAnnotation(Method method, String annotationFullyQualifiedName)
    • getAnnotationFieldValue

      public Optional<Object> getAnnotationFieldValue(Annotation annotation, String fieldName)
      Specified by:
      getAnnotationFieldValue in interface io.contextmap.core.reflection.ObjectToJsonConverter.ObjectToJsonReflection
    • isClassAvailable

      public boolean isClassAvailable(String fullyQualifiedName)