Package aQute.bnd.component
Class DSAnnotationReader
java.lang.Object
aQute.bnd.osgi.ClassDataCollector
aQute.bnd.component.DSAnnotationReader
Processes spec DS annotations into xml.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final class
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Analyzer
(package private) boolean
private static final Pattern
(package private) Descriptors.TypeRef
(package private) final ClassSignature
(package private) final Clazz
(package private) ComponentDef
private static final Instruction
private static final Instruction
private int
(package private) int
private static final String
(package private) MethodSignature
(package private) Descriptors.TypeRef
(package private) FieldSignature
(package private) final XMLAttributeFinder
(package private) static final Pattern
(package private) Descriptors.TypeRef[]
private static final org.slf4j.Logger
(package private) Clazz.MemberDef
(package private) MultiMap<String,
Clazz.MethodDef> (package private) MethodSignature
(package private) Map<String,
List<DeclarativeServicesAnnotationError>> (package private) final Set<DSAnnotations.Options>
(package private) int
(package private) final Map<Object,
ReferenceDef> static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
-
Constructor Summary
ConstructorsConstructorDescriptionDSAnnotationReader
(Analyzer analyzer, Clazz clazz, Set<DSAnnotations.Options> options, XMLAttributeFinder finder, Version minVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoid
annotation
(Annotation annotation) private void
void
classBegin
(int access, Descriptors.TypeRef name) Are called during class parsingprivate String
determineMethodReferenceType
(ReferenceDef def, Clazz.MethodDef method, MethodSignature signature, String annoService) private String
determineReferenceType
(ReferenceDef def, JavaTypeSignature type, ClassResolver resolver, String annoService) private void
doActivate
(Annotation annotation) private void
doComponent
(Component comp, Annotation annotation) private void
doDeactivate
(Annotation annotation) private void
doDesignate
(Annotation annotation) private void
doModified
(Annotation annotation) private void
doReference
(Reference reference, Annotation annotation) private void
doXmlAttribute
(Annotation annotation, XMLAttribute xmlAttr) void
void
field
(Clazz.FieldDef field) private ComponentDef
getDef()
static ComponentDef
getDefinition
(Clazz c, Analyzer analyzer, Set<DSAnnotations.Options> options, XMLAttributeFinder finder, Version minVersion) private FieldSignature
getFieldSignature
(Clazz.FieldDef field) private MethodSignature
getMethodSignature
(Clazz.MethodDef method) private void
handleMixedUsageError
(Annotation annotation) private void
handlePossibleComponentPropertyAnnotation
(Annotation annotation) private boolean
Check whether the current member should be ignored.void
implementsInterfaces
(Descriptors.TypeRef[] interfaces) void
void
method
(Clazz.MethodDef method) void
parameter
(int p) private void
processActivationObject
(String propertyDefKey, ClassTypeSignature param, String memberDescriptor, DeclarativeServicesAnnotationError details, boolean deactivate) private void
processConstructorActivationArgs
(int toArg) extract properties from an activation objectprivate void
processMethodActivationArgs
(String propertyDefKeyFormat, String memberDescriptor, DeclarativeServicesAnnotationError details, boolean deactivate) look for annotation activation objects and extract properties from themprivate final String
referredMethod
(Analyzer analyzer, ReferenceDef rdef, String value, Map.Entry<Pattern, String>... matches) toString()
Methods inherited from class aQute.bnd.osgi.ClassDataCollector
addReference, annotationDefault, annotationDefault, classEnd, classStart, classStart, constant, deprecated, enclosingMethod, innerClass, methodParameters, referenceMethod, referTo, signature, typeuse, version
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
V1_0
-
V1_1
-
V1_2
-
V1_3
-
V1_4
-
V1_5
-
VMAX
-
BINDNAME
-
IDENTIFIERTOPROPERTY
-
COMPONENT_INSTR
-
COMPONENT_PROPERTY_INSTR
-
wrappers
-
unbind1
-
unbind2
-
updated1
-
updated2
-
constructorArgFormat
- See Also:
-
component
ComponentDef component -
clazz
-
classSig
-
interfaces
Descriptors.TypeRef[] interfaces -
member
Clazz.MemberDef member -
methodSig
MethodSignature methodSig -
fieldSig
FieldSignature fieldSig -
constructorSig
MethodSignature constructorSig -
parameter
int parameter -
constructorArg
int constructorArg -
className
Descriptors.TypeRef className -
analyzer
Analyzer analyzer -
methods
MultiMap<String,Clazz.MethodDef> methods -
extendsClass
Descriptors.TypeRef extendsClass -
baseclass
boolean baseclass -
options
-
referencesByTarget
-
finder
-
mismatchedAnnotations
Map<String,List<DeclarativeServicesAnnotationError>> mismatchedAnnotations -
componentPropertyTypeCount
private int componentPropertyTypeCount
-
-
Constructor Details
-
DSAnnotationReader
DSAnnotationReader(Analyzer analyzer, Clazz clazz, Set<DSAnnotations.Options> options, XMLAttributeFinder finder, Version minVersion)
-
-
Method Details
-
getDefinition
public static ComponentDef getDefinition(Clazz c, Analyzer analyzer, Set<DSAnnotations.Options> options, XMLAttributeFinder finder, Version minVersion) throws Exception - Throws:
Exception
-
getDef
- Throws:
Exception
-
referredMethod
@SafeVarargs private final String referredMethod(Analyzer analyzer, ReferenceDef rdef, String value, Map.Entry<Pattern, String>... matches) - Parameters:
analyzer
-rdef
-
-
annotation
- Overrides:
annotation
in classClassDataCollector
-
handleMixedUsageError
- Throws:
Exception
-
handlePossibleComponentPropertyAnnotation
- Throws:
Exception
-
doXmlAttribute
-
doDesignate
-
doActivate
-
doDeactivate
-
doModified
-
processMethodActivationArgs
private void processMethodActivationArgs(String propertyDefKeyFormat, String memberDescriptor, DeclarativeServicesAnnotationError details, boolean deactivate) look for annotation activation objects and extract properties from them -
processConstructorActivationArgs
private void processConstructorActivationArgs(int toArg) extract properties from an activation object -
processActivationObject
private void processActivationObject(String propertyDefKey, ClassTypeSignature param, String memberDescriptor, DeclarativeServicesAnnotationError details, boolean deactivate) -
doReference
- Parameters:
reference
-annotation
-- Throws:
Exception
-
getDetails
private DeclarativeServicesAnnotationError getDetails(ReferenceDef def, DeclarativeServicesAnnotationError.ErrorType type) -
determineReferenceType
private String determineReferenceType(ReferenceDef def, JavaTypeSignature type, ClassResolver resolver, String annoService) -
determineMethodReferenceType
private String determineMethodReferenceType(ReferenceDef def, Clazz.MethodDef method, MethodSignature signature, String annoService) -
checkMapReturnType
-
doComponent
- Parameters:
annotation
-- Throws:
Exception
-
classBegin
Are called during class parsing- Overrides:
classBegin
in classClassDataCollector
-
extendsClass
- Overrides:
extendsClass
in classClassDataCollector
-
implementsInterfaces
- Overrides:
implementsInterfaces
in classClassDataCollector
-
ignoreMember
private boolean ignoreMember()Check whether the current member should be ignored.- Returns:
true
if the current member should be ignored.false
otherwise.
-
field
- Overrides:
field
in classClassDataCollector
-
getFieldSignature
-
method
- Overrides:
method
in classClassDataCollector
-
getMethodSignature
-
memberEnd
public void memberEnd()- Overrides:
memberEnd
in classClassDataCollector
-
parameter
public void parameter(int p) - Overrides:
parameter
in classClassDataCollector
-
toString
-