public class XMLConfiguration
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private HashMap<java.lang.String,java.lang.Boolean> |
analyzeMembers
Just stores whether the most detailed type of annotation attachment per
class is a member (true) or not (false).
|
private HashMap<java.lang.String,AnnotationBuilderMap> |
configuration
Stores the configuration, i.e. a mapping from signatures to annotation
types to annotation builders.
|
private boolean |
exclusive
Stores if this configuration is exclusive, i.e. authoritive or if it may
overlap with source code annotations.
|
private HashMap<java.lang.String,MonitoringGroupConfiguration> |
groupConfigurations
Stores the group configurations.
|
private ArrayList<Pattern> |
patterns
Stores the patterns.
|
| Constructor and Description |
|---|
XMLConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
HashMap<java.lang.String,java.lang.Boolean> |
getAnalyzeMembers()
Returns a mapping between class names and whether code analysis of
members is required according to the configuration.
|
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.String signature,
java.lang.Object classOfSignature,
java.lang.Class<T> cls,
IResolver resolver)
Returns the annotation attached to the given signature.
|
private <T extends java.lang.annotation.Annotation> |
getBuilderForPattern(java.lang.String signature,
java.lang.Object classOfSignature,
java.lang.Class<T> cls,
IResolver resolver)
Returns the annotation builder derived from a pattern or a type
constrained from the given signature.
|
MonitoringGroupConfiguration |
getMonitoringGroupConfiguration(java.lang.String recId)
Returns the monitoring group configuration for the specified recorder
identification.
|
<T extends java.lang.annotation.Annotation> |
hasAnnotation(java.lang.String signature,
java.lang.Object classOfSignature,
java.lang.Class<T> cls,
IResolver resolver)
Returns if this configuration states that the given signature has an
"annotation" of the given annotation class.
|
boolean |
isExclusive()
Returns if this configuration is exclusive, i.e. authoritive.
|
static XMLConfiguration |
read(java.lang.String file)
Reads a configuration from a given file.
|
private HashMap<java.lang.String,AnnotationBuilderMap> configuration
private HashMap<java.lang.String,MonitoringGroupConfiguration> groupConfigurations
private boolean exclusive
true.private HashMap<java.lang.String,java.lang.Boolean> analyzeMembers
public static XMLConfiguration read(java.lang.String file) throws java.io.IOException
file - the file to readjava.io.IOException - in case of any reading error, including erroneous
structures and unknown informationpublic <T extends java.lang.annotation.Annotation> boolean hasAnnotation(java.lang.String signature,
java.lang.Object classOfSignature,
java.lang.Class<T> cls,
IResolver resolver)
T - the annotation type (inferred)signature - the signature to search for (no return type, no spaces,
no parameter names, no exceptions, fully qualified names only,
prefixed fully qualified name for methods)classOfSignature - an object representing the class of the
signature. This instance may be passed to resolver and
is therefore dependent on the implementation of the instrumentercls - the annotation class to matchresolver - an optional resolver instance to create annotations
based on parameterized data on call (may be null)true if a mapping exist, i.e. an annotation is
defined for the signature, false elsepublic <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.String signature,
java.lang.Object classOfSignature,
java.lang.Class<T> cls,
IResolver resolver)
T - the annotation type (inferred)signature - the signature to search for (no return type, no spaces,
no parameter names, no exceptions, fully qualified names only,
prefixed fully qualified name for methods)classOfSignature - an object representing the class of the
signature. This instance may be passed to resolver and
is therefore dependent on the implementation of the instrumentercls - the annotation class to matchresolver - an optional resolver instance to create annotations
based on parameterized data on call (may be null)private <T extends java.lang.annotation.Annotation> IAnnotationBuilder<?> getBuilderForPattern(java.lang.String signature, java.lang.Object classOfSignature, java.lang.Class<T> cls, IResolver resolver)
T - the annotation type (inferred)signature - the signature to search for (no return type, no spaces,
no parameter names, no exceptions, fully qualified names only,
prefixed fully qualified name for methods)classOfSignature - an object representing the class of the
signature. This instance may be passed to resolver and
is therefore dependent on the implementation of the instrumentercls - the annotation class to matchresolver - an optional resolver instance to create annotations
based on parameterized data on call (may be null)public boolean isExclusive()
true if exclusive, false if it should
be combined with source code annotationspublic HashMap<java.lang.String,java.lang.Boolean> getAnalyzeMembers()
public MonitoringGroupConfiguration getMonitoringGroupConfiguration(java.lang.String recId)
recId - the recorder identification to return the configuration forMonitoringGroupConfiguration.DEFAULT but not null)