Top Description Inners Fields Constructors Methods
com.sun.tools.javac.jvm

public Class ModuleNameReader

extends Object
Class Inheritance
Imports
com.sun.tools.javac.util.ByteBuffer, .ByteBuffer.UnderflowException, .Convert, java.io.IOException, .InputStream, java.nio.file.Files, .Path, javax.tools.JavaFileObject

Stripped down ClassReader, just sufficient to read module names from module-info.class files while analyzing the module path.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private int
bp

The current input pointer.

private ByteBuffer
buf

The buffer containing the currently read class file.

private static final int
private PoolReader
reader

The constant pool reader.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
checkZero(int count, String name)

pack-priv char
nextChar()

Read a character.

pack-priv int
nextInt()

Read an integer.

public String
public String
public String
pack-priv PoolReader.Utf8Mapper<String>
utf8Mapper(boolean internalize)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bpback to summary
private int bp

The current input pointer.

bufback to summary
private ByteBuffer buf

The buffer containing the currently read class file.

INITIAL_BUFFER_SIZEback to summary
private static final int INITIAL_BUFFER_SIZE
readerback to summary
private PoolReader reader

The constant pool reader.

Constructor Detail

ModuleNameReaderback to summary
public ModuleNameReader()

Method Detail

checkZeroback to summary
pack-priv void checkZero(int count, String name) throws BadClassFile
nextCharback to summary
pack-priv char nextChar() throws BadClassFile

Read a character.

nextIntback to summary
pack-priv int nextInt() throws BadClassFile

Read an integer.

readModuleNameback to summary
public String readModuleName(Path p) throws IOException, BadClassFile
readModuleNameback to summary
public String readModuleName(JavaFileObject jfo) throws IOException, BadClassFile
readModuleNameback to summary
public String readModuleName(InputStream in) throws IOException, BadClassFile
utf8Mapperback to summary
pack-priv PoolReader.Utf8Mapper<String> utf8Mapper(boolean internalize)
com.sun.tools.javac.jvm back to summary

public Class ModuleNameReader.BadClassFile

extends Exception
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Constructor Detail

BadClassFileback to summary
pack-priv BadClassFile(String msg)