public class JavaNames
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static char[] |
ARRAY_FIELD_DESCRIPTOR_PREFIX |
static char[] |
FIELD_DESCRIPTOR_PREFIX |
| Constructor and Description |
|---|
JavaNames() |
| Modifier and Type | Method and Description |
|---|---|
static char[] |
binaryNameToFieldDescriptor(char[] binaryName)
Converts a binary name to a field descriptor (without the trailing ';')
|
static char[] |
binaryNameToFullyQualifiedName(char[] binaryName) |
static char[] |
binaryNameToResourceRelativePath(char[] binaryName)
Given the binary name of a class, returns the jar-relative path of the class file within that
jar, including the .class extension.
|
static char[] |
binaryNameToSimpleName(char[] binaryName)
Converts a java binary name to a simple name.
|
static java.lang.String |
classFilePathToBinaryName(java.lang.String classFilePath) |
static char[] |
fieldDescriptorToBinaryName(char[] fieldDescriptor)
Given a field descriptor, if the field descriptor points to a class this returns the binary name of the class.
|
static char[] |
fieldDescriptorToJavaName(char[] fieldDescriptor,
boolean fullyQualified)
Converts a field descriptor to a java name.
|
static char[] |
fieldDescriptorToSimpleName(char[] fieldDescriptor)
Converts a field descriptor to a simple class name.
|
static char[] |
fullyQualifiedNameToBinaryName(char[] fullyQualifiedName) |
static char[] |
fullyQualifiedNameToFieldDescriptor(char[] fullyQualifiedName) |
static char[] |
getIndexPathFor(NdType type,
IWorkspaceRoot root)
Given a NdType, returns its identifier in the form accepted by
IJavaSearchScope.encloses(String) |
static char[] |
getMethodId(char[] parentTypeBinaryName,
char[] methodSelectorAndDescriptor)
Returns a method id (suitable for constructing a
NdMethodId) given a field descriptor for its parent type
and a combined method selector and method descriptor for the method |
static char[] |
getMethodId(char[] parentTypeBinaryName,
char[] methodSelector,
char[] methodDescriptor) |
static char[] |
simpleNameToSourceName(char[] chars)
Given a simple name, this returns the source name for the type.
|
public static final char[] FIELD_DESCRIPTOR_PREFIX
public static final char[] ARRAY_FIELD_DESCRIPTOR_PREFIX
public static char[] binaryNameToSimpleName(char[] binaryName)
public static char[] binaryNameToResourceRelativePath(char[] binaryName)
public static char[] fullyQualifiedNameToBinaryName(char[] fullyQualifiedName)
public static char[] fullyQualifiedNameToFieldDescriptor(char[] fullyQualifiedName)
public static char[] getIndexPathFor(NdType type, IWorkspaceRoot root)
IJavaSearchScope.encloses(String)public static char[] binaryNameToFieldDescriptor(char[] binaryName)
public static char[] fieldDescriptorToSimpleName(char[] fieldDescriptor)
public static char[] fieldDescriptorToJavaName(char[] fieldDescriptor,
boolean fullyQualified)
public static char[] binaryNameToFullyQualifiedName(char[] binaryName)
public static char[] getMethodId(char[] parentTypeBinaryName,
char[] methodSelectorAndDescriptor)
NdMethodId) given a field descriptor for its parent type
and a combined method selector and method descriptor for the methodparentTypeBinaryName - a field descriptor of the sort returned by the other *ToFieldDescriptor methods.methodSelectorAndDescriptor - a method selector and descriptor of the form returned by IBinaryType.getEnclosingMethod()NdMethodIdpublic static char[] getMethodId(char[] parentTypeBinaryName,
char[] methodSelector,
char[] methodDescriptor)
public static char[] fieldDescriptorToBinaryName(char[] fieldDescriptor)
fieldDescriptor - public static char[] simpleNameToSourceName(char[] chars)
public static java.lang.String classFilePathToBinaryName(java.lang.String classFilePath)