Class Patterns
java.lang.Object
org.apache.felix.dm.annotation.plugin.bnd.Patterns
Class containings pattern matching helper methods.
- Author:
- Felix Project Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Patternstatic final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringinferTypeFromGenericType(String methodDescriptor, String signature, Logger m_logger) Infer service dependency type from a bind method accepting a ServiceReference or a ServiceObject parameterstatic StringparseClass(String clazz, Pattern pattern, int group) Parses a class.static StringparseClass(String clazz, Pattern pattern, int group, boolean throwException) Parses a class.static voidparseField(String field, String descriptor, Pattern pattern) Checks if a field descriptor matches a given pattern.static voidparseMethod(String method, String descriptor, Pattern pattern) Checks if a method descriptor matches a given pattern.
-
Field Details
-
VOID
-
COMPOSITION
-
BIND_CLASS1
-
BIND_CLASS2
-
BIND_CLASS3
-
BIND_CLASS4
-
BIND_CLASS5
-
BIND_CLASS6
-
BIND_CLASS7
-
BIND_CLASS8
-
BIND_CLASS9
-
CLASS
-
RUNNABLE
-
BUNDLE_CONTEXT
-
BUNDLE
-
DEPENDENCY_MANAGER
-
COMPONENT
-
SERVICE_REGISTRATION
-
METHOD_RETURN_MAP
-
UPDATED_NO_CONFIG_TYPES
-
UPDATED_CONFIG_TYPES
-
-
Constructor Details
-
Patterns
public Patterns()
-
-
Method Details
-
inferTypeFromGenericType
public static String inferTypeFromGenericType(String methodDescriptor, String signature, Logger m_logger) Infer service dependency type from a bind method accepting a ServiceReference or a ServiceObject parameter- Parameters:
m_logger-
-
parseClass
Parses a class.- Parameters:
clazz- the class to be parsed (the package is "/" separated).pattern- the pattern used to match the class.group- the pattern group index where the class can be retrieved.- Returns:
- the parsed class.
-
parseClass
Parses a class.- Parameters:
clazz- the class to be parsed (the package is "/" separated).pattern- the pattern used to match the class.group- the pattern group index where the class can be retrieved.throwException- true if an Exception must be thrown in case the clazz does not match the pattern.- Returns:
- the parsed class.
-
parseMethod
Checks if a method descriptor matches a given pattern.- Parameters:
pattern- the pattern used to check the method signature descriptorthe- method whose signature descriptor is checked- Throws:
IllegalArgumentException- if the method signature descriptor does not match the given pattern.
-
parseField
Checks if a field descriptor matches a given pattern.- Parameters:
field- the field whose type descriptor is checkeddescriptor- the field descriptor to be checkedpattern- the pattern to use- Throws:
IllegalArgumentException- if the method signature descriptor does not match the given pattern.
-