Class ComponentPropertyParser

java.lang.Object
org.apache.sling.testing.mock.osgi.config.ComponentPropertyParser

public final class ComponentPropertyParser extends Object
A few items borrowed from biz.aQute.bndlib DSAnnotationReader and PropertyDef to construct a Map for felix scr Annotations.toObject() from a combination of an annotation type and an array of property key=value strings provided via a ConfigType annotation.
  • Method Details

    • isSupportedPropertyMapValueType

      public static boolean isSupportedPropertyMapValueType(Class<?> attributeType)
    • isSupportedConfigTypeValueType

      public static boolean isSupportedConfigTypeValueType(Class<?> attributeType)
    • parse

      public static Map<String,Object> parse(@NotNull @NotNull String[] properties)
    • parse

      public static Map<String,Object> parse(@NotNull @NotNull Class<?> configType, @NotNull @NotNull String[] properties)
    • assertOneToOneMapping

      public static void assertOneToOneMapping(@NotNull @NotNull Class<?> configType, @NotNull @NotNull String[] properties)