|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.softevo.ample.eval.Pattern
public class Pattern
A pattern and the index in the trace it was discovered.
Field Summary | |
---|---|
static java.security.MessageDigest |
digest
The message digest for md5 hashing. |
private int |
discoveryIndex
The discovery index of the pattern. |
private int |
lastOccurence
The last time this pattern was found. |
private java.lang.String[] |
methodCallSequence
The sequence of method calls. |
private int |
numberOfOccurences
The number of times the pattern occured. |
Constructor Summary | |
---|---|
Pattern(java.lang.String[] methodCallSequence,
int discoveryIndex)
Creates a new pattern. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object object)
Compares this object by the number of references. |
void |
countOccurence()
Increases the occurence counter by one. |
boolean |
equals(java.lang.Object object)
Two patterns are considered equal if they have the same method call sequence. |
java.lang.String |
getCanonicalPattern()
Gets the canonical form of the pattern. |
int |
getDiscoveryIndex()
Gets the discovery index for the pattern. |
byte[] |
getHash()
Gets a md5 hash of the canonical pattern. |
int |
getLastOccurence()
Gets the last occurence of this pattern. |
java.lang.String[] |
getMethodCallSequence()
Gets the method call sequence. |
int |
getNumberOfOccurences()
Gets the number of times the pattern was found. |
int |
hashCode()
Gets the hash code of the concatenated method calls. |
void |
setLastOccurence(int lastOccurence)
Sets a new value for the last occurence. |
void |
setOccurences(int occurences)
Sets the number of occurences. |
java.lang.String |
toString()
Returns a textual representation of the method call sequence. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.security.MessageDigest digest
private java.lang.String[] methodCallSequence
private int discoveryIndex
private int numberOfOccurences
private int lastOccurence
Constructor Detail |
---|
public Pattern(java.lang.String[] methodCallSequence, int discoveryIndex)
methodCalls
- the call sequencediscoveryIndex
- the index in the trace the pattern was discoveredMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void countOccurence()
public int getNumberOfOccurences()
public java.lang.String[] getMethodCallSequence()
public int getDiscoveryIndex()
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- the object to compare this entry topublic boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- another patternpublic byte[] getHash()
public int getLastOccurence()
public void setLastOccurence(int lastOccurence)
public void setOccurences(int occurences)
public java.lang.String getCanonicalPattern()
SimpleFormat
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |