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 classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferprivate final CharBufferprivate final IntBufferprivate final CodePointBuffer.Type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCodePointBuffer(CodePointBuffer.Type type, ByteBuffer byteBuffer, CharBuffer charBuffer, IntBuffer intBuffer) -
Method Summary
Modifier and TypeMethodDescription(package private) intstatic CodePointBuffer.Builderbuilder(int initialBufferSize) (package private) byte[](package private) char[]intget(int offset) (package private) CodePointBuffer.TypegetType()(package private) int[]intArray()intposition()voidposition(int newPosition) intstatic CodePointBufferwithBytes(ByteBuffer byteBuffer) static CodePointBufferwithChars(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
-