Class AnnotationMockMetadata

  • All Implemented Interfaces:
    MockMetadata

    public class AnnotationMockMetadata
    extends java.lang.Object
    implements MockMetadata
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Class<? extends java.lang.annotation.Annotation> annotation  
      private java.lang.annotation.Annotation annotationInstance  
      private java.lang.String fieldName  
      private java.lang.reflect.Method[] methods  
      private java.lang.Object mock  
      private java.lang.String qualifier  
      private java.lang.Class<?> type  
    • Constructor Summary

      Constructors 
      Constructor Description
      AnnotationMockMetadata​(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.reflect.Field field)  
    • Field Detail

      • type

        private final java.lang.Class<?> type
      • methods

        private final java.lang.reflect.Method[] methods
      • qualifier

        private final java.lang.String qualifier
      • annotation

        private final java.lang.Class<? extends java.lang.annotation.Annotation> annotation
      • annotationInstance

        private final java.lang.annotation.Annotation annotationInstance
      • fieldName

        private final java.lang.String fieldName
      • mock

        private java.lang.Object mock
    • Constructor Detail

      • AnnotationMockMetadata

        public AnnotationMockMetadata​(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
                                      java.lang.reflect.Field field)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • findQualifier

        private java.lang.String findQualifier()
      • getAnnotation

        public java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotation()
        Specified by:
        getAnnotation in interface MockMetadata
      • getType

        public java.lang.Class<?> getType()
        Specified by:
        getType in interface MockMetadata
      • getMethods

        public java.lang.reflect.Method[] getMethods()
        Specified by:
        getMethods in interface MockMetadata
      • getMethod

        private java.lang.reflect.Method[] getMethod()
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMock

        public java.lang.Object getMock()
        Specified by:
        getMock in interface MockMetadata
      • setMock

        public void setMock​(java.lang.Object mock)
        Specified by:
        setMock in interface MockMetadata
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object