org.netbeans.modules.java.sourceui/1 1.23.1 1

org.netbeans.api.java.source.ui
Class ElementHeaders

java.lang.Object
  extended by org.netbeans.api.java.source.ui.ElementHeaders

public final class ElementHeaders
extends Object


Field Summary
static String ANNOTATIONS
           
static String EXTENDS
           
static String FLAGS
           
static String IMPLEMENTS
           
static String NAME
           
static String PARAMETERS
           
static String THROWS
           
static String TYPE
           
static String TYPEPARAMETERS
           
 
Method Summary
static int getDistance(String s, String t)
          Computes distance between strings
static String getHeader(Element element, CompilationInfo info, String formatString)
          Formats header of an element.
static String getHeader(TreePath treePath, CompilationInfo info, String formatString)
          Formats header of a tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANNOTATIONS

public static final String ANNOTATIONS
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

TYPE

public static final String TYPE
See Also:
Constant Field Values

THROWS

public static final String THROWS
See Also:
Constant Field Values

IMPLEMENTS

public static final String IMPLEMENTS
See Also:
Constant Field Values

EXTENDS

public static final String EXTENDS
See Also:
Constant Field Values

TYPEPARAMETERS

public static final String TYPEPARAMETERS
See Also:
Constant Field Values

FLAGS

public static final String FLAGS
See Also:
Constant Field Values

PARAMETERS

public static final String PARAMETERS
See Also:
Constant Field Values
Method Detail

getHeader

public static String getHeader(TreePath treePath,
                               CompilationInfo info,
                               String formatString)
Formats header of a tree. The tree must represent an element e.g. type method, field, ...
example of formatString: "method " + NAME + PARAMETERS + " has return type " + TYPE

Parameters:
treePath - TreePath to the tree header is required for
info - CompilationInfo
formatString - Formating string
Returns:
Formated header of the tree

getHeader

public static String getHeader(Element element,
                               CompilationInfo info,
                               String formatString)
Formats header of an element.
example of formatString: "method " + NAME + PARAMETERS + " has return type " + TYPE

Parameters:
element - Element to be formated
info - Compilation info
formatString - Formating string
Returns:
Formated header of the element

getDistance

public static int getDistance(String s,
                              String t)
Computes distance between strings

Parameters:
s - First string
t - Second string
Returns:
Distance between the strings. (Number of changes which have to be done to get from s to t.

org.netbeans.modules.java.sourceui/1 1.23.1 1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.