Class HeaderReader

All Implemented Interfaces:
Constants, Registry, Report, Reporter, Closeable, AutoCloseable, Iterable<String>

public class HeaderReader extends Processor
  • Field Details

    • PROPERTY_PATTERN

      private static final Pattern PROPERTY_PATTERN
    • LIFECYCLE_METHODS

      private static final Set<String> LIFECYCLE_METHODS
    • analyzer

      private final Analyzer analyzer
    • ComponentContextTR

      private static final String ComponentContextTR
      See Also:
    • BundleContextTR

      private static final String BundleContextTR
      See Also:
    • MapTR

      private static final String MapTR
    • IntTR

      private static final String IntTR
    • allowed

      static final Set<String> allowed
    • allowedDeactivate

      static final Set<String> allowedDeactivate
    • ServiceReferenceTR

      private static final String ServiceReferenceTR
      See Also:
    • REFERENCE

      public static final Pattern REFERENCE
  • Constructor Details

    • HeaderReader

      public HeaderReader(Analyzer analyzer)
  • Method Details

    • createComponentTag

      public Tag createComponentTag(String name, String impl, Map<String,String> info) throws Exception
      Throws:
      Exception
    • checkIdentifier

      private String checkIdentifier(String name, String value)
    • getNamespace

      private void getNamespace(Map<String,String> info, ComponentDef cd, Map<String,Clazz.MethodDef> descriptors)
      Check if we need to use the v1.1 namespace (or later).
      Parameters:
      info -
      cd - TODO
      descriptors - TODO
    • properties

      void properties(ComponentDef cd, Map<String,String> info, String name)
      Print the Service-Component properties element
      Parameters:
      cd -
      info -
    • provide

      void provide(ComponentDef cd, String provides, String impl)
      Parameters:
      cd -
      provides -
    • rateLifecycle

      int rateLifecycle(Clazz.MethodDef test, Set<String> allowedParams)
      rates the methods according to the scale in 112.5.8 (compendium 4.3, ds 1.2), also returning "6" for invalid methods We don't look at return values yet due to proposal to all them for setting service properties.
      Parameters:
      test - methodDef to examine for suitability as a DS lifecycle method
      allowedParams - TODO
      Returns:
      rating; 6 if invalid, lower is better
    • rateBind

      int rateBind(Clazz.MethodDef test)
      see 112.3.2. We can't distinguish the bind type, so we just accept anything.
      Parameters:
      test -
    • reference

      void reference(Map<String,String> info, String impl, ComponentDef cd, Map<String,Clazz.MethodDef> descriptors) throws Exception
      Throws:
      Exception
    • calculateBind

      private String calculateBind(String referenceName)