public class Rule extends Object implements Comparable<Object>
Rules can have wildcards.
Rules are ordered according to their precedence.
Constructor and Description |
---|
Rule(String rule)
Creates a rule used used by InstrumentationDescriptor to determine
whether a particular class needs to be instrumented.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
The precedence determines the order of Rules.
|
boolean |
equals(Object o)
Two rules are equal if the strings which represent them equals.
|
double |
getPrecedence()
Get a precedence of this Rule.
|
int |
hashCode() |
boolean |
isMoreSignificant(Rule other)
Checks whether this Rule is more significant than the given Rule.
|
boolean |
match(String s)
Check if a given String matches this Rule.
|
String |
toString() |
public Rule(String rule) throws JiapiException
rule
- a rule can be a classname and it can contain wildcardsJiapiException
- on errorpublic boolean match(String s)
s
- String to matchpublic double getPrecedence()
public boolean isMoreSignificant(Rule other)
other
- other Rulepublic int compareTo(Object o)
compareTo
in interface Comparable<Object>
o
- other Rulepublic boolean equals(Object o)
Copyright © 2017. All rights reserved.