edu.umd.cs.findbugs.model

Class ClassNameRewriterUtil

public abstract class ClassNameRewriterUtil extends Object

Utility methods for using a ClassNameRewriter.

Author: David Hovemeyer

Method Summary
static FieldAnnotationconvertFieldAnnotation(ClassNameRewriter classNameRewriter, FieldAnnotation annotation)
Rewrite a FieldAnnotation to update the class name and field signature, if needed.
static MethodAnnotationconvertMethodAnnotation(ClassNameRewriter classNameRewriter, MethodAnnotation annotation)
Rewrite a MethodAnnotation to update the class name, and any class names mentioned in the method signature.
static StringrewriteMethodSignature(ClassNameRewriter classNameRewriter, String methodSignature)
Rewrite a method signature.
static StringrewriteSignature(ClassNameRewriter classNameRewriter, String signature)
Rewrite a signature.

Method Detail

convertFieldAnnotation

public static FieldAnnotation convertFieldAnnotation(ClassNameRewriter classNameRewriter, FieldAnnotation annotation)
Rewrite a FieldAnnotation to update the class name and field signature, if needed.

Parameters: classNameRewriter a ClassNameRewriter annotation a FieldAnnotation

Returns: the possibly-rewritten FieldAnnotation

convertMethodAnnotation

public static MethodAnnotation convertMethodAnnotation(ClassNameRewriter classNameRewriter, MethodAnnotation annotation)
Rewrite a MethodAnnotation to update the class name, and any class names mentioned in the method signature.

Parameters: classNameRewriter a ClassNameRewriter annotation a MethodAnnotation

Returns: the possibly-rewritten MethodAnnotation

rewriteMethodSignature

public static String rewriteMethodSignature(ClassNameRewriter classNameRewriter, String methodSignature)
Rewrite a method signature.

Parameters: classNameRewriter a ClassNameRewriter methodSignature a method signature

Returns: the rewritten method signature

rewriteSignature

public static String rewriteSignature(ClassNameRewriter classNameRewriter, String signature)
Rewrite a signature.

Parameters: classNameRewriter a ClassNameRewriter signature a signature (parameter, return type, or field)

Returns: rewritten signature with class name updated if required

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.