public final class JavaQualifiedName extends java.lang.Object implements QualifiedName
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
FORMAT
Pattern specifying the format.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String[] |
getClasses()
Returns the class specific part of the name.
|
JavaQualifiedName |
getClassName() |
java.lang.String |
getOperation()
Returns the operation specific part of the name.
|
java.lang.String[] |
getPackages()
Returns the packages.
|
int |
hashCode() |
boolean |
isClass() |
boolean |
isOperation() |
static JavaQualifiedName |
ofClass(java.lang.Class<?> clazz)
Gets the qualified name of a class.
|
static JavaQualifiedName |
ofString(java.lang.String name)
Parses a qualified name given in the format defined for this implementation.
|
java.lang.String |
toString() |
public static final java.util.regex.Pattern FORMAT
((\w+\.)+|\.)((\w+)(\$\w+)*)(#(\w+)\(((\w+)(, \w+)*)?\))?
public static JavaQualifiedName ofClass(java.lang.Class<?> clazz)
clazz
- Class objectpublic static JavaQualifiedName ofString(java.lang.String name)
FORMAT
). Examples:
com.company.MyClass$Nested#myMethod(String, int)
.MyClass$Nested
name
- The name to parse.public boolean isClass()
isClass
in interface QualifiedName
public boolean isOperation()
isOperation
in interface QualifiedName
public java.lang.String[] getPackages()
public java.lang.String[] getClasses()
public java.lang.String getOperation()
public JavaQualifiedName getClassName()
getClassName
in interface QualifiedName
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in interface QualifiedName
toString
in class java.lang.Object
Copyright © 2002–2017 PMD. All rights reserved.