org.netbeans.api.java.source.ui
Class ElementHeaders
java.lang.Object
org.netbeans.api.java.source.ui.ElementHeaders
public final class ElementHeaders
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 forinfo
- CompilationInfoformatString
- 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 formatedinfo
- Compilation infoformatString
- Formating string
- Returns:
- Formated header of the element
getDistance
public static int getDistance(String s,
String t)
- Computes distance between strings
- Parameters:
s
- First stringt
- Second string
- Returns:
- Distance between the strings. (Number of changes which have to
be done to get from
s
to t
.