public class InstrumentationDescriptor
extends java.lang.Object
InstrumentationDescriptor holds those Instrumentations which use the same Rules. Rules define which classes is to be instrumented.
Instrumentation
Constructor and Description |
---|
InstrumentationDescriptor() |
Modifier and Type | Method and Description |
---|---|
void |
addExclusionRule(java.lang.String rule)
Adds an exclusion rule to this descriptor.
|
void |
addInclusionRule(java.lang.String rule)
Adds a rule to this descriptor.
|
void |
addInstrumentor(Instrumentor instrumentor)
Adds a new chain.
|
java.util.Set |
getExclusionsRules()
Gets the inclusion rules of this descriptor.
|
java.util.Set |
getInclusionsRules()
Gets the inclusion rules of this descriptor.
|
java.util.List |
getInstrumentors()
Gets all the Instrumentations.
|
boolean |
match(java.lang.String className)
Check whether the given className matches any of given rules.
|
java.lang.String |
toString() |
public void addExclusionRule(java.lang.String rule) throws JiapiException
In general Exclusion rules are more powerful than inclusion rules. That is, if for some reason two similar rules are assigned to both exclusion and inclusion rules, exclusion rule will win.
rule
- A Exclusion rule, that is to be added to this descriptorJiapiException
- thrown if there's a syntax error in rulepublic void addInclusionRule(java.lang.String rule) throws JiapiException
Format of the rule is the same, as fully qualified Java package/class/method names. For example, following are valid rules:
rule
- A Inclusion rule, that is to be added to this descriptorJiapiException
- thrown if there's a syntax error in rulepublic void addInstrumentor(Instrumentor instrumentor)
i
- Instrumentor that is used in instrumentingpatch
- Patch, which is associated with the Instrumentor givenpublic java.util.Set getExclusionsRules()
public java.util.Set getInclusionsRules()
public java.util.List getInstrumentors()
public boolean match(java.lang.String className)
className
- a class namepublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2001. Documenation generated February 9 2016.