public class DescriptorFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
canonicalize(FieldDescriptor m) |
void |
canonicalize(MethodDescriptor m) |
static java.lang.String |
canonicalizeString(java.lang.String s) |
static void |
clearInstance() |
static ClassDescriptor |
createClassDescriptor(java.lang.Class<?> aClass) |
static ClassDescriptor |
createClassDescriptor(org.apache.bcel.classfile.JavaClass c) |
static ClassDescriptor |
createClassDescriptor(java.lang.String className) |
static ClassDescriptor[] |
createClassDescriptor(java.lang.String[] classNames) |
static ClassDescriptor |
createClassDescriptorFromDottedClassName(java.lang.String dottedClassName) |
static ClassDescriptor |
createClassDescriptorFromFieldSignature(java.lang.String signature)
Create a class descriptor from a field signature
|
static ClassDescriptor |
createClassDescriptorFromResourceName(java.lang.String resourceName)
Create a class descriptor from a resource name.
|
static ClassDescriptor |
createClassDescriptorFromSignature(java.lang.String signature) |
static ClassDescriptor |
createClassOrObjectDescriptorFromSignature(java.lang.String signature) |
java.util.Collection<ClassDescriptor> |
getAllClassDescriptors() |
ClassDescriptor |
getClassDescriptor(java.lang.Class<?> actualClass) |
static ClassDescriptor |
getClassDescriptor(org.apache.bcel.generic.ObjectType type)
Get a ClassDescriptor for the class described by given ObjectType object.
|
ClassDescriptor |
getClassDescriptor(java.lang.String className)
Get a ClassDescriptor for a class name in VM (slashed) format.
|
ClassDescriptor |
getClassDescriptorForDottedClassName(java.lang.String dottedClassName)
Get a ClassDescriptor for a class name in dotted format.
|
FieldDescriptor |
getFieldDescriptor(FieldAnnotation ma) |
FieldDescriptor |
getFieldDescriptor(java.lang.String className,
org.apache.bcel.classfile.Field ma) |
FieldDescriptor |
getFieldDescriptor(java.lang.String className,
java.lang.String name,
java.lang.String signature,
boolean isStatic)
Get a FieldDescriptor.
|
MethodDescriptor |
getMethodDescriptor(org.apache.bcel.classfile.JavaClass jClass,
org.apache.bcel.classfile.Method method) |
MethodDescriptor |
getMethodDescriptor(MethodAnnotation ma) |
MethodDescriptor |
getMethodDescriptor(java.lang.String className,
java.lang.String name,
java.lang.String signature,
boolean isStatic)
Get a MethodDescriptor.
|
static DescriptorFactory |
instance()
Get the singleton instance of the DescriptorFactory.
|
static boolean |
isClassResource(java.lang.String resourceName)
Determine whether or not the given resource name refers to a class.
|
void |
profile() |
void |
purge(java.util.Collection<ClassDescriptor> unusable) |
public static java.lang.String canonicalizeString(@CheckForNull java.lang.String s)
public static DescriptorFactory instance()
public static void clearInstance()
public java.util.Collection<ClassDescriptor> getAllClassDescriptors()
public void purge(java.util.Collection<ClassDescriptor> unusable)
@Nonnull public ClassDescriptor getClassDescriptor(java.lang.Class<?> actualClass)
@Nonnull public ClassDescriptor getClassDescriptor(@SlashedClassName java.lang.String className)
className
- a class name in VM (slashed) formatpublic ClassDescriptor getClassDescriptorForDottedClassName(@DottedClassName java.lang.String dottedClassName)
dottedClassName
- a class name in dotted formatpublic MethodDescriptor getMethodDescriptor(org.apache.bcel.classfile.JavaClass jClass, org.apache.bcel.classfile.Method method)
public MethodDescriptor getMethodDescriptor(@SlashedClassName java.lang.String className, java.lang.String name, java.lang.String signature, boolean isStatic)
className
- name of the class containing the method, in VM format (e.g.,
"java/lang/String")name
- name of the methodsignature
- signature of the methodisStatic
- true if method is static, false otherwisepublic void profile()
public void canonicalize(MethodDescriptor m)
public void canonicalize(FieldDescriptor m)
public MethodDescriptor getMethodDescriptor(MethodAnnotation ma)
public FieldDescriptor getFieldDescriptor(@SlashedClassName java.lang.String className, java.lang.String name, java.lang.String signature, boolean isStatic)
className
- the name of the class the field belongs to, in VM format
(e.g., "java/lang/String")name
- the name of the fieldsignature
- the field signature (type)isStatic
- true if field is static, false if notpublic FieldDescriptor getFieldDescriptor(@SlashedClassName java.lang.String className, org.apache.bcel.classfile.Field ma)
public FieldDescriptor getFieldDescriptor(FieldAnnotation ma)
public static ClassDescriptor getClassDescriptor(org.apache.bcel.generic.ObjectType type)
type
- an ObjectTypepublic static ClassDescriptor createClassDescriptor(org.apache.bcel.classfile.JavaClass c)
public static ClassDescriptor createClassDescriptorFromResourceName(java.lang.String resourceName)
resourceName
- the resource name@CheckForNull public static ClassDescriptor createClassDescriptorFromFieldSignature(java.lang.String signature)
public static boolean isClassResource(java.lang.String resourceName)
resourceName
- the resource namepublic static ClassDescriptor createClassDescriptorFromSignature(java.lang.String signature)
public static ClassDescriptor createClassOrObjectDescriptorFromSignature(java.lang.String signature)
public static ClassDescriptor createClassDescriptor(java.lang.Class<?> aClass)
@Nonnull public static ClassDescriptor createClassDescriptor(@SlashedClassName java.lang.String className)
public static ClassDescriptor[] createClassDescriptor(java.lang.String[] classNames)
public static ClassDescriptor createClassDescriptorFromDottedClassName(java.lang.String dottedClassName)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.