Package org.antlr.v4.runtime
Class CodePointBuffer
java.lang.Object
org.antlr.v4.runtime.CodePointBuffer
Wrapper for
ByteBuffer
/ CharBuffer
/ IntBuffer
.
Because Java lacks generics on primitive types, these three types
do not share an interface, so we have to write one manually.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBuffer
private final CharBuffer
private final IntBuffer
private final CodePointBuffer.Type
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CodePointBuffer
(CodePointBuffer.Type type, ByteBuffer byteBuffer, CharBuffer charBuffer, IntBuffer intBuffer) -
Method Summary
Modifier and TypeMethodDescription(package private) int
static CodePointBuffer.Builder
builder
(int initialBufferSize) (package private) byte[]
(package private) char[]
int
get
(int offset) (package private) CodePointBuffer.Type
getType()
(package private) int[]
intArray()
int
position()
void
position
(int newPosition) int
static CodePointBuffer
withBytes
(ByteBuffer byteBuffer) static CodePointBuffer
withChars
(CharBuffer charBuffer) static CodePointBuffer
-
Field Details
-
type
-
byteBuffer
-
charBuffer
-
intBuffer
-
-
Constructor Details
-
CodePointBuffer
private CodePointBuffer(CodePointBuffer.Type type, ByteBuffer byteBuffer, CharBuffer charBuffer, IntBuffer intBuffer)
-
-
Method Details
-
withBytes
-
withChars
-
withInts
-
position
public int position() -
position
public void position(int newPosition) -
remaining
public int remaining() -
get
public int get(int offset) -
getType
CodePointBuffer.Type getType() -
arrayOffset
int arrayOffset() -
byteArray
byte[] byteArray() -
charArray
char[] charArray() -
intArray
int[] intArray() -
builder
-