Package kieker.common.util.signature
Class ClassOperationSignaturePair
java.lang.Object
kieker.common.util.signature.ClassOperationSignaturePair
public class ClassOperationSignaturePair
extends java.lang.Object
This class represents a pair containing the classname and the signature of an operation.
- Since:
- 1.5
- Author:
- Andre van Hoorn, Jan Waller
-
Constructor Summary
Constructors Constructor Description ClassOperationSignaturePair(java.lang.String fqClassname, Signature signature)
Creates a new instance of this class using the given parameters. -
Method Summary
Modifier and Type Method Description static java.lang.String
createOperationSignatureString(java.lang.String fqClassName, Signature signature)
Given a fully-qualified class name fqClassName (e.g.,a.b.c.D
) and aSignature
(e.g., for operationop1
with modifierspublic
andstatic
, the return typeBoolean
, and the parameter typesInteger
andLong
), the method returns an operation signature string (e.g.,public static Boolean a.b.c.D.op1(Integer, Long)
).boolean
equals(java.lang.Object obj)
java.lang.String
getFqClassname()
Delivers the fully qualified class name.java.lang.String
getPackageName()
This method delivers the package name of the class.Signature
getSignature()
Delivers the signature.java.lang.String
getSimpleClassname()
This method delivers a simplified version of the fully qualified class name.int
hashCode()
static ClassOperationSignaturePair
splitOperationSignatureStr(java.lang.String operationSignatureStr)
Extracts anClassOperationSignaturePair
from an operation signature string (e.g.,public static Boolean a.b.c.D.op1(Integer, Long)
).static ClassOperationSignaturePair
splitOperationSignatureStr(java.lang.String operationSignatureStr, boolean javaConstructor)
Split up an operation signature string and populate a class operation signature pair.java.lang.String
toOperationSignatureString()
This method assembles an operation signature string from the current fields.java.lang.String
toString()
Returns a String representation of thisClassOperationSignaturePair
using thecreateOperationSignatureString(String, Signature)
method.
-
Constructor Details
-
ClassOperationSignaturePair
Creates a new instance of this class using the given parameters.- Parameters:
fqClassname
- The fully qualified name of the class.signature
- The signature.
-
-
Method Details
-
getFqClassname
public java.lang.String getFqClassname()Delivers the fully qualified class name.- Returns:
- the fqClassname
-
getSignature
Delivers the signature.- Returns:
- the signature
-
getSimpleClassname
public java.lang.String getSimpleClassname()This method delivers a simplified version of the fully qualified class name. In other words: The string behind the last '.' of the fully qualified name (this is usually just the name of the class and nothing else).- Returns:
- The simple class name.
-
getPackageName
public java.lang.String getPackageName()This method delivers the package name of the class. In other words: This method returns everything before the last '.' of the fully qualified name.- Returns:
- The package name.
-
toOperationSignatureString
public java.lang.String toOperationSignatureString()This method assembles an operation signature string from the current fields.- Returns:
- An operation signature string.
-
splitOperationSignatureStr
public static ClassOperationSignaturePair splitOperationSignatureStr(java.lang.String operationSignatureStr)Extracts anClassOperationSignaturePair
from an operation signature string (e.g.,public static Boolean a.b.c.D.op1(Integer, Long)
). Modifier list, return type, and parameter list wrapped by parentheses are optional. But note that a return type must be given if one or more modifiers are present.- Parameters:
operationSignatureStr
- The signature string.- Returns:
- The
ClassOperationSignaturePair
extracted from the given string.
-
splitOperationSignatureStr
public static ClassOperationSignaturePair splitOperationSignatureStr(java.lang.String operationSignatureStr, boolean javaConstructor)Split up an operation signature string and populate a class operation signature pair.- Parameters:
operationSignatureStr
- the signature stringjavaConstructor
- if true the string holds a constructor signature- Returns:
- a ClassOperationSignaturePair
-
createOperationSignatureString
public static java.lang.String createOperationSignatureString(java.lang.String fqClassName, Signature signature)Given a fully-qualified class name fqClassName (e.g.,a.b.c.D
) and aSignature
(e.g., for operationop1
with modifierspublic
andstatic
, the return typeBoolean
, and the parameter typesInteger
andLong
), the method returns an operation signature string (e.g.,public static Boolean a.b.c.D.op1(Integer, Long)
).- Parameters:
fqClassName
- The fully qualified class name.signature
- The signature string.- Returns:
- An operation signature string as defined by the given parameters.
-
toString
public java.lang.String toString()Returns a String representation of thisClassOperationSignaturePair
using thecreateOperationSignatureString(String, Signature)
method.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this object.
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-