Class AnnotationReader


  • public class AnnotationReader
    extends ClassDataCollector
    Processes spec DS annotations into xml.
    • Field Detail

      • PROPERTY_PATTERN

        static final java.util.regex.Pattern PROPERTY_PATTERN
      • V1_0

        public static final Version V1_0
      • V1_1

        public static final Version V1_1
      • V1_2

        public static final Version V1_2
      • V1_3

        public static final Version V1_3
      • V1_4

        public static final Version V1_4
      • BINDNAME

        static final java.util.regex.Pattern BINDNAME
      • BINDDESCRIPTORDS10

        static final java.util.regex.Pattern BINDDESCRIPTORDS10
      • BINDDESCRIPTORDS11

        static final java.util.regex.Pattern BINDDESCRIPTORDS11
      • BINDDESCRIPTORDS13

        static final java.util.regex.Pattern BINDDESCRIPTORDS13
      • LIFECYCLEDESCRIPTORDS10

        static final java.util.regex.Pattern LIFECYCLEDESCRIPTORDS10
      • LIFECYCLEDESCRIPTORDS11

        static final java.util.regex.Pattern LIFECYCLEDESCRIPTORDS11
      • LIFECYCLEDESCRIPTORDS13

        static final java.util.regex.Pattern LIFECYCLEDESCRIPTORDS13
      • LIFECYCLEARGUMENT

        static final java.util.regex.Pattern LIFECYCLEARGUMENT
      • IDENTIFIERTOPROPERTY

        static final java.util.regex.Pattern IDENTIFIERTOPROPERTY
      • DEACTIVATEDESCRIPTORDS11

        static final java.util.regex.Pattern DEACTIVATEDESCRIPTORDS11
      • DEACTIVATEDESCRIPTORDS13

        static final java.util.regex.Pattern DEACTIVATEDESCRIPTORDS13
      • wrappers

        static final java.util.Map<java.lang.String,​java.lang.Class<?>> wrappers
      • baseclass

        boolean baseclass
    • Method Detail

      • getDef

        private ComponentDef getDef()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • referredMethod

        protected java.lang.String referredMethod​(Analyzer analyzer,
                                                  ReferenceDef rdef,
                                                  java.lang.String value,
                                                  java.lang.String... matches)
        Parameters:
        analyzer -
        rdef -
      • classEnd

        public void classEnd()
                      throws java.lang.Exception
        Overrides:
        classEnd in class ClassDataCollector
        Throws:
        java.lang.Exception
      • handleMixedUsageError

        private void handleMixedUsageError​(Annotation annotation)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • doDesignate

        protected void doDesignate​(org.osgi.service.metatype.annotations.Designate a)
      • doActivate

        protected void doActivate()
      • doDeactivate

        protected void doDeactivate()
      • doModified

        protected void doModified()
      • processAnnotationArguments

        private void processAnnotationArguments​(java.lang.String methodDescriptor,
                                                DeclarativeServicesAnnotationError details)
        look for annotation arguments and extract properties from them
        Parameters:
        methodDescriptor -
        fqn - TODO
        method - TODO
        descriptor - TODO
      • doReference

        protected void doReference​(org.osgi.service.component.annotations.Reference reference,
                                   Annotation raw)
                            throws java.lang.Exception
        Parameters:
        reference -
        raw -
        Throws:
        java.lang.Exception
      • sufficientGenerics

        private boolean sufficientGenerics​(int index,
                                           int sigLength,
                                           ReferenceDef def,
                                           java.lang.String sig)
      • determineReferenceType

        private java.lang.String determineReferenceType​(java.lang.String methodDescriptor,
                                                        ReferenceDef def,
                                                        java.lang.String annoService,
                                                        java.lang.String signature)
      • noMatch

        private boolean noMatch​(java.lang.String annoService,
                                java.lang.String inferredService)
        Parameters:
        annoService -
        inferredService -
        Returns:
        true if the inferred service is a non-parameter object because it differs from the specified service type.
      • doComponent

        protected void doComponent​(org.osgi.service.component.annotations.Component comp,
                                   Annotation annotation)
                            throws java.lang.Exception
        Parameters:
        annotation -
        Throws:
        java.lang.Exception
      • doProperty

        private void doProperty​(java.lang.String[] properties)
        Parse the properties