|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.compiler.util.Util
public class Util
| Nested Class Summary | |
|---|---|
static interface |
Util.Displayable
|
| Field Summary | |
|---|---|
static int[] |
EMPTY_INT_ARRAY
|
static java.lang.String |
EMPTY_STRING
|
static java.lang.String |
LINE_SEPARATOR
|
static java.lang.String |
UTF_8
|
| Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.util.SuffixConstants |
|---|
EXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_jar, EXTENSION_JAR, EXTENSION_java, EXTENSION_JAVA, EXTENSION_zip, EXTENSION_ZIP, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_jar, SUFFIX_JAR, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_jar, SUFFIX_STRING_JAR, SUFFIX_STRING_java, SUFFIX_STRING_JAVA, SUFFIX_STRING_zip, SUFFIX_STRING_ZIP, SUFFIX_zip, SUFFIX_ZIP |
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static char[] |
bytesToChar(byte[] bytes,
java.lang.String encoding)
Returns the given bytes as a char array using a given encoding (null means platform default). |
static byte[] |
getFileByteContent(java.io.File file)
Returns the contents of the given file as a byte array. |
static char[] |
getFileCharContent(java.io.File file,
java.lang.String encoding)
Returns the contents of the given file as a char array. |
static byte[] |
getInputStreamAsByteArray(java.io.InputStream stream,
int length)
Returns the given input stream's contents as a byte array. |
static char[] |
getInputStreamAsCharArray(java.io.InputStream stream,
int length,
java.lang.String encoding)
Returns the given input stream's contents as a character array. |
static int |
getLineNumber(int position,
int[] lineEnds,
int g,
int d)
|
static byte[] |
getZipEntryByteContent(java.util.zip.ZipEntry ze,
java.util.zip.ZipFile zip)
Returns the contents of the given zip entry as a byte array. |
static boolean |
isAjFileName(java.lang.String name)
|
static boolean |
isArchiveFileName(java.lang.String name)
Returns true iff str.toLowerCase().endsWith(".jar") || str.toLowerCase().endsWith(".zip") implementation is not creating extra strings. |
static boolean |
isClassFileName(char[] name)
Returns true iff str.toLowerCase().endsWith(".class") implementation is not creating extra strings. |
static boolean |
isClassFileName(java.lang.String name)
Returns true iff str.toLowerCase().endsWith(".class") implementation is not creating extra strings. |
static boolean |
isExcluded(char[] path,
char[][] inclusionPatterns,
char[][] exclusionPatterns,
boolean isFolderPath)
|
static boolean |
isJavaFileName(char[] name)
Returns true iff str.toLowerCase().endsWith(".java") implementation is not creating extra strings. |
static boolean |
isJavaFileName(java.lang.String name)
Returns true iff str.toLowerCase().endsWith(".java") implementation is not creating extra strings. |
static int |
searchColumnNumber(int[] startLineIndexes,
int lineNumber,
int position)
INTERNAL USE-ONLY Search the column number corresponding to a specific position |
static java.lang.Boolean |
toBoolean(boolean bool)
Converts a boolean value into Boolean. |
static java.lang.String |
toString(java.lang.Object[] objects)
Converts an array of Objects into String. |
static java.lang.String |
toString(java.lang.Object[] objects,
Util.Displayable renderer)
Converts an array of Objects into String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String UTF_8
public static final java.lang.String LINE_SEPARATOR
public static final java.lang.String EMPTY_STRING
public static final int[] EMPTY_INT_ARRAY
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static char[] bytesToChar(byte[] bytes,
java.lang.String encoding)
throws java.io.IOException
java.io.IOException
public static byte[] getFileByteContent(java.io.File file)
throws java.io.IOException
java.io.IOException - if a problem occured reading the file.
public static char[] getFileCharContent(java.io.File file,
java.lang.String encoding)
throws java.io.IOException
java.io.IOException - if a problem occured reading the file.
public static byte[] getInputStreamAsByteArray(java.io.InputStream stream,
int length)
throws java.io.IOException
java.io.IOException - if a problem occured reading the stream.
public static char[] getInputStreamAsCharArray(java.io.InputStream stream,
int length,
java.lang.String encoding)
throws java.io.IOException
java.io.IOException - if a problem occured reading the stream.
public static int getLineNumber(int position,
int[] lineEnds,
int g,
int d)
public static byte[] getZipEntryByteContent(java.util.zip.ZipEntry ze,
java.util.zip.ZipFile zip)
throws java.io.IOException
java.io.IOException - if a problem occured reading the zip entry.public static final boolean isArchiveFileName(java.lang.String name)
public static final boolean isClassFileName(char[] name)
public static final boolean isClassFileName(java.lang.String name)
public static final boolean isExcluded(char[] path,
char[][] inclusionPatterns,
char[][] exclusionPatterns,
boolean isFolderPath)
public static final boolean isJavaFileName(char[] name)
public static final boolean isJavaFileName(java.lang.String name)
public static final boolean isAjFileName(java.lang.String name)
public static final int searchColumnNumber(int[] startLineIndexes,
int lineNumber,
int position)
public static java.lang.Boolean toBoolean(boolean bool)
bool - The boolean to convert
public static java.lang.String toString(java.lang.Object[] objects)
public static java.lang.String toString(java.lang.Object[] objects,
Util.Displayable renderer)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||