Top Description Inners Fields Constructors Methods
org.graalvm.polyglot.impl

pack-priv final Class UnnamedToModuleByteSequenceGen

extends UnnamedToModuleByteSequence
Class Inheritance
Imports
java.lang.invoke.MethodHandle, .MethodHandles.Lookup, .MethodType, java.util.List, .Objects, java.util.stream.IntStream, org.graalvm.polyglot.impl.UnnamedToModuleBridge.UnnamedToModuleByteSequence, org.graalvm.polyglot.io.ByteSequence

Generated code used for Truffle unnamed to named module bridge. This code allows polyglot on the classpath to delegate to polyglot on the module-path. This code is generated by the polyglot annotation processor.asdf

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final UnnamedToModuleByteSequenceGen.Handles
pack-priv final Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public byte
byteAt(int
the index of the byte value to be returned
index_
)

Implements org.graalvm.polyglot.io.ByteSequence.byteAt.

Returns the byte value at the specified index.

public IntStream
bytes()

Overrides default org.graalvm.polyglot.io.ByteSequence.bytes.

Returns a stream of int zero-extending the byte values from this sequence.

public boolean
equals(Object
the reference object with which to compare.
obj_
)

Overrides org.graalvm.polyglot.impl.UnnamedToModuleBridge.UnnamedToModuleByteSequence.equals.

Indicates whether some other object is "equal to" this one.

private static <T extends Throwable> RuntimeException
public int
public int
length()

Implements org.graalvm.polyglot.io.ByteSequence.length.

Returns the length of this byte sequence.

public ByteSequence
subSequence(int
the start index, inclusive
startIndex_
,
int
the end index, exclusive
endIndex_
)

Overrides default org.graalvm.polyglot.io.ByteSequence.subSequence.

Returns a ByteSequence that is a subsequence of this sequence.

public byte[]
toByteArray()

Overrides default org.graalvm.polyglot.io.ByteSequence.toByteArray.

Returns a byte[] containing the bytes in this sequence in the same order as this sequence.

public String
Inherited from org.graalvm.polyglot.impl.UnnamedToModuleBridge.UnnamedToModuleByteSequence:
fromByteSequencemethodHandleLookup

Field Detail

HANDLESback to summary
private static final UnnamedToModuleByteSequenceGen.Handles HANDLES
receiverback to summary
pack-priv final Object receiver

Constructor Detail

UnnamedToModuleByteSequenceGenback to summary
public UnnamedToModuleByteSequenceGen(Object receiver)

Method Detail

byteAtback to summary
public byte byteAt(int index_)

Implements org.graalvm.polyglot.io.ByteSequence.byteAt.

Doc from org.graalvm.polyglot.io.ByteSequence.byteAt.

Returns the byte value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

Parameters
index_:int

the index of the byte value to be returned

Returns:byte

the specified byte value

Annotations
@Override
bytesback to summary
public IntStream bytes()

Overrides default org.graalvm.polyglot.io.ByteSequence.bytes.

Doc from org.graalvm.polyglot.io.ByteSequence.bytes.

Returns a stream of int zero-extending the byte values from this sequence.

Returns:IntStream

an IntStream of byte values from this sequence

Annotations
@Override
equalsback to summary
public boolean equals(Object obj_)

Overrides org.graalvm.polyglot.impl.UnnamedToModuleBridge.UnnamedToModuleByteSequence.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj_:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
handleException_back to summary
private static <T extends Throwable> RuntimeException handleException_(Throwable t) throws Throwable-:T
Annotations
@SuppressWarnings:unchecked
hashCodeback to summary
public int hashCode()

Overrides org.graalvm.polyglot.impl.UnnamedToModuleBridge.UnnamedToModuleByteSequence.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
lengthback to summary
public int length()

Implements org.graalvm.polyglot.io.ByteSequence.length.

Doc from org.graalvm.polyglot.io.ByteSequence.length.

Returns the length of this byte sequence.

Returns:int

the number of bytes in this sequence

Annotations
@Override
subSequenceback to summary
public ByteSequence subSequence(int startIndex_, int endIndex_)

Overrides default org.graalvm.polyglot.io.ByteSequence.subSequence.

Doc from org.graalvm.polyglot.io.ByteSequence.subSequence.

Returns a ByteSequence that is a subsequence of this sequence. The subsequence starts with the byte value at the specified index and ends with the byte value at index end - 1. The length (in bytes) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Parameters
startIndex_:int

the start index, inclusive

endIndex_:int

the end index, exclusive

Returns:ByteSequence

the specified subsequence

Annotations
@Override
toByteArrayback to summary
public byte[] toByteArray()

Overrides default org.graalvm.polyglot.io.ByteSequence.toByteArray.

Doc from org.graalvm.polyglot.io.ByteSequence.toByteArray.

Returns a byte[] containing the bytes in this sequence in the same order as this sequence. The length of the byte array will be the length of this sequence. Creates a new byte array with every invocation.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.graalvm.polyglot.impl.UnnamedToModuleBridge.UnnamedToModuleByteSequence.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.graalvm.polyglot.impl back to summary

pack-priv final Class UnnamedToModuleByteSequenceGen.Handles

extends Object
Class Inheritance
  • java.lang.Object
  • org.graalvm.polyglot.impl.UnnamedToModuleByteSequenceGen.Handles

Field Summary

Modifier and TypeField and Description
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

byteAt_back to summary
private final MethodHandle byteAt_
bytes_back to summary
private final MethodHandle bytes_
equals_back to summary
private final MethodHandle equals_
hashCode_back to summary
private final MethodHandle hashCode_
length_back to summary
private final MethodHandle length_
subSequence_back to summary
private final MethodHandle subSequence_
toByteArray_back to summary
private final MethodHandle toByteArray_
toString_back to summary
private final MethodHandle toString_

Constructor Detail

Handlesback to summary
pack-priv Handles(MethodHandles.Lookup lookup) throws ReflectiveOperationException