Class ApexQualifiedName
- java.lang.Object
-
- net.sourceforge.pmd.lang.apex.ast.ApexQualifiedName
-
public final class ApexQualifiedName extends Object
Qualified name of an apex class or method.- Author:
- Clément Fournier
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String[]
getClasses()
ApexQualifiedName
getClassName()
Returns the qualified name of the class the resource is located in.String
getNameSpace()
Gets the namespace prefix of this resource.String
getOperation()
int
hashCode()
boolean
isClass()
Returns true if the resource addressed by this qualified name is a class.boolean
isOperation()
Returns true if the resource addressed by this qualified name is an operation.static ApexQualifiedName
ofString(String toParse)
Parses a string conforming to the format defined below and returns an ApexQualifiedName.String
toString()
-
-
-
Method Detail
-
getOperation
public String getOperation()
-
getClasses
public String[] getClasses()
-
getNameSpace
public String getNameSpace()
Gets the namespace prefix of this resource.- Returns:
- The namespace prefix
-
isClass
public boolean isClass()
Returns true if the resource addressed by this qualified name is a class.- Returns:
- true if the resource addressed by this qualified name is a class.
-
isOperation
public boolean isOperation()
Returns true if the resource addressed by this qualified name is an operation.- Returns:
- true if the resource addressed by this qualified name is an operation.
-
getClassName
public ApexQualifiedName getClassName()
Returns the qualified name of the class the resource is located in. If this instance addresses a class, returns this instance.- Returns:
- The qualified name of the class
-
ofString
public static ApexQualifiedName ofString(String toParse)
Parses a string conforming to the format defined below and returns an ApexQualifiedName.Here are some examples of the format:
-
namespace__OuterClass.InnerClass
: name of an inner class -
namespace__Class#method(String, int)
: name of an operation
- Parameters:
toParse
- The string to parse- Returns:
- An ApexQualifiedName, or null if the string couldn't be parsed
-
-
-