|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.rsta.ac.java.Util
public class Util
Utility methods for Java completion.
| Method Summary | |
|---|---|
static String |
docCommentToHtml(String dc)
Converts a Java documentation comment to HTML. |
static CompilationUnit |
getCompilationUnitFromDisk(File loc,
ClassFile cf)
Used by MemberCompletion.Data implementations to get an AST
from a source file in a directory or zip/jar file. |
static String |
getUnqualified(String clazz)
Returns the "unqualified" version of a (possibly) fully-qualified class name. |
static boolean |
isFullyQualified(String str)
Returns whether the specified string is "fully qualified," that is, whether it contains a ' .' character. |
static String |
replaceChar(String str,
char oldCh,
char newCh)
Does a fast replacement of all instances of one char with another. |
static String[] |
splitOnChar(String str,
int ch)
A faster way to split on a single char than String#split(), since we'll be doing this in a tight loop possibly thousands of times (rt.jar). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final String docCommentToHtml(String dc)
dc - The documentation comment.
public static CompilationUnit getCompilationUnitFromDisk(File loc,
ClassFile cf)
MemberCompletion.Data implementations to get an AST
from a source file in a directory or zip/jar file.
loc - A directory or zip/jar file.cf - The ClassFile representing the source grab from the
location.
null if it is not found
or an IO error occurs.public static final String getUnqualified(String clazz)
clazz - The class name.
public static final boolean isFullyQualified(String str)
.' character.
str - The string to check.
public static final String replaceChar(String str,
char oldCh,
char newCh)
str - The string to do the replacements in.oldCh - The character to look for.newCh - The character to replace with.
public static final String[] splitOnChar(String str,
int ch)
String.split(String)),
in the case where str ends with ch - this
method will return an empty item at the end of the returned array, while
String#split() will not.
str - The string to split.ch - The char to split on.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||