public class DSAnnotationReader extends ClassDataCollector
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
DSAnnotationReader.ComponentPropertyTypeDataCollector |
| Modifier and Type | Field and Description |
|---|---|
(package private) Analyzer |
analyzer |
(package private) boolean |
baseclass |
private static java.util.regex.Pattern |
BINDNAME |
(package private) Descriptors.TypeRef |
className |
(package private) ClassSignature |
classSig |
(package private) Clazz |
clazz |
(package private) ComponentDef |
component |
private static Instruction |
COMPONENT_INSTR |
private static Instruction |
COMPONENT_PROPERTY_INSTR |
private int |
componentPropertyTypeCount |
(package private) int |
constructorArg |
private static java.lang.String |
constructorArgFormat |
(package private) MethodSignature |
constructorSig |
(package private) Descriptors.TypeRef |
extendsClass |
(package private) FieldSignature |
fieldSig |
(package private) XMLAttributeFinder |
finder |
(package private) static java.util.regex.Pattern |
IDENTIFIERTOPROPERTY |
(package private) Descriptors.TypeRef[] |
interfaces |
private static org.slf4j.Logger |
logger |
(package private) Clazz.FieldDef |
member |
(package private) MultiMap<java.lang.String,Clazz.MethodDef> |
methods |
(package private) MethodSignature |
methodSig |
(package private) java.util.Map<java.lang.String,java.util.List<DeclarativeServicesAnnotationError>> |
mismatchedAnnotations |
(package private) java.util.Set<DSAnnotations.Options> |
options |
(package private) int |
parameter |
(package private) java.util.Map<java.lang.Object,ReferenceDef> |
referencesByTarget |
private static java.util.Map.Entry<java.util.regex.Pattern,java.lang.String> |
unbind1 |
private static java.util.Map.Entry<java.util.regex.Pattern,java.lang.String> |
unbind2 |
private static java.util.Map.Entry<java.util.regex.Pattern,java.lang.String> |
updated1 |
private static java.util.Map.Entry<java.util.regex.Pattern,java.lang.String> |
updated2 |
static Version |
V1_0 |
static Version |
V1_1 |
static Version |
V1_2 |
static Version |
V1_3 |
static Version |
V1_4 |
(package private) static java.util.Map<java.lang.String,java.lang.Class<?>> |
wrappers |
| Constructor and Description |
|---|
DSAnnotationReader(Analyzer analyzer,
Clazz clazz,
java.util.Set<DSAnnotations.Options> options,
XMLAttributeFinder finder,
Version minVersion) |
| Modifier and Type | Method and Description |
|---|---|
void |
annotation(Annotation annotation) |
private void |
checkMapReturnType(DeclarativeServicesAnnotationError details) |
void |
classBegin(int access,
Descriptors.TypeRef name)
Are called during class parsing
|
private java.lang.String |
determineMethodReferenceType(ReferenceDef def,
Clazz.MethodDef method,
MethodSignature signature,
java.lang.String annoService) |
private java.lang.String |
determineReferenceType(ReferenceDef def,
JavaTypeSignature type,
ClassResolver resolver,
java.lang.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 |
extendsClass(Descriptors.TypeRef name) |
void |
field(Clazz.FieldDef field) |
private ComponentDef |
getDef() |
static ComponentDef |
getDefinition(Clazz c,
Analyzer analyzer,
java.util.Set<DSAnnotations.Options> options,
XMLAttributeFinder finder,
Version minVersion) |
private DeclarativeServicesAnnotationError |
getDetails(ReferenceDef def,
DeclarativeServicesAnnotationError.ErrorType type) |
private FieldSignature |
getFieldSignature(Clazz.FieldDef field) |
private MethodSignature |
getMethodSignature(Clazz.MethodDef method) |
private void |
handleMixedUsageError(Annotation annotation) |
private void |
handlePossibleComponentPropertyAnnotation(Annotation annotation) |
void |
implementsInterfaces(Descriptors.TypeRef[] interfaces) |
void |
memberEnd() |
void |
method(Clazz.MethodDef method) |
void |
parameter(int p) |
private void |
processActivationObject(java.lang.String propertyDefKey,
ClassTypeSignature param,
java.lang.String memberDescriptor,
DeclarativeServicesAnnotationError details,
boolean deactivate) |
private void |
processConstructorActivationArgs(int toArg)
extract properties from an activation object
|
private void |
processMethodActivationArgs(java.lang.String propertyDefKeyFormat,
java.lang.String memberDescriptor,
DeclarativeServicesAnnotationError details,
boolean deactivate)
look for annotation activation objects and extract properties from them
|
private java.lang.String |
referredMethod(Analyzer analyzer,
ReferenceDef rdef,
java.lang.String value,
java.util.Map.Entry<java.util.regex.Pattern,java.lang.String>... matches) |
addReference, annotationDefault, annotationDefault, classEnd, classStart, classStart, constant, deprecated, enclosingMethod, innerClass, methodParameters, referenceMethod, referTo, signature, typeuse, versionprivate static final org.slf4j.Logger logger
public static final Version V1_0
public static final Version V1_1
public static final Version V1_2
public static final Version V1_3
public static final Version V1_4
private static final java.util.regex.Pattern BINDNAME
static final java.util.regex.Pattern IDENTIFIERTOPROPERTY
private static final Instruction COMPONENT_INSTR
private static final Instruction COMPONENT_PROPERTY_INSTR
static final java.util.Map<java.lang.String,java.lang.Class<?>> wrappers
private static final java.util.Map.Entry<java.util.regex.Pattern,java.lang.String> unbind1
private static final java.util.Map.Entry<java.util.regex.Pattern,java.lang.String> unbind2
private static final java.util.Map.Entry<java.util.regex.Pattern,java.lang.String> updated1
private static final java.util.Map.Entry<java.util.regex.Pattern,java.lang.String> updated2
private static final java.lang.String constructorArgFormat
ComponentDef component
final Clazz clazz
final ClassSignature classSig
Descriptors.TypeRef[] interfaces
Clazz.FieldDef member
MethodSignature methodSig
FieldSignature fieldSig
MethodSignature constructorSig
int parameter
int constructorArg
Descriptors.TypeRef className
Analyzer analyzer
MultiMap<java.lang.String,Clazz.MethodDef> methods
Descriptors.TypeRef extendsClass
boolean baseclass
final java.util.Set<DSAnnotations.Options> options
final java.util.Map<java.lang.Object,ReferenceDef> referencesByTarget
final XMLAttributeFinder finder
java.util.Map<java.lang.String,java.util.List<DeclarativeServicesAnnotationError>> mismatchedAnnotations
private int componentPropertyTypeCount
DSAnnotationReader(Analyzer analyzer, Clazz clazz, java.util.Set<DSAnnotations.Options> options, XMLAttributeFinder finder, Version minVersion)
public static ComponentDef getDefinition(Clazz c, Analyzer analyzer, java.util.Set<DSAnnotations.Options> options, XMLAttributeFinder finder, Version minVersion) throws java.lang.Exception
java.lang.Exceptionprivate ComponentDef getDef() throws java.lang.Exception
java.lang.Exception@SafeVarargs private final java.lang.String referredMethod(Analyzer analyzer, ReferenceDef rdef, java.lang.String value, java.util.Map.Entry<java.util.regex.Pattern,java.lang.String>... matches)
analyzer - rdef - public void annotation(Annotation annotation)
annotation in class ClassDataCollectorprivate void handleMixedUsageError(Annotation annotation) throws java.lang.Exception
java.lang.Exceptionprivate void handlePossibleComponentPropertyAnnotation(Annotation annotation) throws java.lang.Exception
java.lang.Exceptionprivate void doXmlAttribute(Annotation annotation, XMLAttribute xmlAttr)
private void doDesignate(Annotation annotation)
private void doActivate(Annotation annotation)
private void doDeactivate(Annotation annotation)
private void doModified(Annotation annotation)
private void processMethodActivationArgs(java.lang.String propertyDefKeyFormat,
java.lang.String memberDescriptor,
DeclarativeServicesAnnotationError details,
boolean deactivate)
private void processConstructorActivationArgs(int toArg)
private void processActivationObject(java.lang.String propertyDefKey,
ClassTypeSignature param,
java.lang.String memberDescriptor,
DeclarativeServicesAnnotationError details,
boolean deactivate)
private void doReference(Reference reference, Annotation annotation) throws java.lang.Exception
reference - @Reference proxy backed by annotation.annotation - @Reference contentsjava.lang.Exceptionprivate DeclarativeServicesAnnotationError getDetails(ReferenceDef def, DeclarativeServicesAnnotationError.ErrorType type)
private java.lang.String determineReferenceType(ReferenceDef def, JavaTypeSignature type, ClassResolver resolver, java.lang.String annoService)
private java.lang.String determineMethodReferenceType(ReferenceDef def, Clazz.MethodDef method, MethodSignature signature, java.lang.String annoService)
private void checkMapReturnType(DeclarativeServicesAnnotationError details)
private void doComponent(Component comp, Annotation annotation) throws java.lang.Exception
annotation - java.lang.Exceptionpublic void classBegin(int access,
Descriptors.TypeRef name)
classBegin in class ClassDataCollectorpublic void extendsClass(Descriptors.TypeRef name)
extendsClass in class ClassDataCollectorpublic void implementsInterfaces(Descriptors.TypeRef[] interfaces)
implementsInterfaces in class ClassDataCollectorpublic void field(Clazz.FieldDef field)
field in class ClassDataCollectorprivate FieldSignature getFieldSignature(Clazz.FieldDef field)
public void method(Clazz.MethodDef method)
method in class ClassDataCollectorprivate MethodSignature getMethodSignature(Clazz.MethodDef method)
public void memberEnd()
memberEnd in class ClassDataCollectorpublic void parameter(int p)
parameter in class ClassDataCollector