public final class Atom extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
Atom |
arrayDescriptorFromElementDescriptor()
Return array descriptor corresponding to "this" array-element descriptor.
|
static Atom |
concat(Atom ma,
Atom mb) |
static Atom |
concat(byte c,
ImmutableByteArray b) |
boolean |
contains(byte b) |
boolean |
equals(Object obj) |
static Atom |
findOrCreate(byte[] bytes) |
static Atom |
findOrCreate(byte[] utf8,
int off,
int len)
create an Atom from utf8[off] of length len
|
static Atom |
findOrCreate(ImmutableByteArray b) |
static Atom |
findOrCreate(ImmutableByteArray b,
int start,
int length) |
static Atom |
findOrCreateAsciiAtom(String str)
Find or create an atom.
|
static Atom |
findOrCreateUnicodeAtom(String str)
Find or create an atom.
|
static Atom |
findOrCreateUtf8Atom(byte[] utf8)
Find or create an atom.
|
byte |
getVal(int i) |
byte[] |
getValArray()
return an array of bytes representing the utf8 characters in this
|
int |
hashCode() |
boolean |
isArrayDescriptor()
Is "this" atom an array descriptor?
|
static boolean |
isArrayDescriptor(ImmutableByteArray b) |
boolean |
isClassDescriptor()
Is "this" atom a class descriptor?
|
boolean |
isMethodDescriptor()
Is "this" atom a method descriptor?
|
boolean |
isReservedMemberName()
Is "this" atom a reserved member name? Note: Sun has reserved all member names starting with '<' for future use.
|
Atom |
left(int count)
New Atom containing first count bytes
|
int |
length() |
int |
parseForArrayDimensionality()
Parse "this" array descriptor to obtain number of dimensions in corresponding array type.
|
Atom |
parseForArrayElementDescriptor()
Parse "this" array descriptor to obtain descriptor for array's element type.
|
Atom |
parseForInnermostArrayElementDescriptor()
Return the innermost element type reference for an array
|
Atom |
right(int count)
New Atom containing last count bytes
|
int |
rIndex(byte b) |
boolean |
startsWith(Atom start) |
String |
toString()
Return printable representation of "this" atom.
|
String |
toUnicodeString()
Return printable representation of "this" atom.
|
public static Atom findOrCreateUnicodeAtom(String str)
str - atom value, as string literal whose characters are unicodepublic static Atom findOrCreateAsciiAtom(String str)
str - atom value, as string literal whose characters are from ascii subset of unicode (not including null)IllegalArgumentException - if str is nullpublic static Atom findOrCreateUtf8Atom(byte[] utf8)
utf8 - atom value, as utf8 encoded bytesIllegalArgumentException - if utf8 is nullpublic static Atom findOrCreate(byte[] utf8, int off, int len) throws IllegalArgumentException, IllegalArgumentException, IllegalArgumentException
IllegalArgumentException - if utf8.length <= offpublic static Atom findOrCreate(byte[] bytes)
public static Atom findOrCreate(ImmutableByteArray b)
public static Atom findOrCreate(ImmutableByteArray b, int start, int length)
public final String toString()
public final String toUnicodeString() throws UTFDataFormatException
UTFDataFormatExceptionpublic final Atom left(int count)
public final Atom right(int count)
public final boolean startsWith(Atom start)
public final Atom arrayDescriptorFromElementDescriptor()
public final boolean isReservedMemberName()
public final boolean isClassDescriptor()
public final boolean isArrayDescriptor()
public final boolean isMethodDescriptor()
throws IllegalArgumentException
IllegalArgumentExceptionpublic final int length()
public final Atom parseForArrayElementDescriptor() throws IllegalArgumentException
IllegalArgumentExceptionpublic final int parseForArrayDimensionality()
throws IllegalArgumentException
IllegalStateException - if this Atom does not represent an arrayIllegalArgumentExceptionpublic final Atom parseForInnermostArrayElementDescriptor() throws IllegalArgumentException
IllegalStateException - if this Atom does not represent an array descriptorIllegalArgumentExceptionpublic int hashCode()
hashCode in class ObjectObject.hashCode()public byte[] getValArray()
public byte getVal(int i)
throws IllegalArgumentException
IllegalArgumentExceptionpublic boolean contains(byte b)
public int rIndex(byte b)
public static Atom concat(byte c, ImmutableByteArray b)
public static boolean isArrayDescriptor(ImmutableByteArray b)
Copyright © 2015. All rights reserved.