Top Description Fields Constructors Methods
org.easymock.asm

public abstract Class ModuleVisitor

extends Object
Class Inheritance
Known Direct Subclasses
org.easymock.asm.ModuleWriter

A visitor to visit a Java module. The methods of this class must be called in the following order: ( visitMainClass | ( visitPackage | visitRequire | visitExport | visitOpen | visitUse | visitProvide )* ) visitEnd.
Authors
Remi Forax, Eric Bruneton

Field Summary

Modifier and TypeField and Description
protected final int
api

The ASM API version implemented by this visitor.

protected ModuleVisitor
mv

The module visitor to which this visitor must delegate method calls.

Constructor Summary

AccessConstructor and Description
protected
ModuleVisitor(final int
the ASM API version implemented by this visitor. Must be one of Opcodes#ASM6 or Opcodes#ASM7.
api
)

Constructs a new ModuleVisitor.

protected
ModuleVisitor(final int
the ASM API version implemented by this visitor. Must be one of Opcodes#ASM6 or Opcodes#ASM7.
api
,
final ModuleVisitor
the module visitor to which this visitor must delegate method calls. May be null.
moduleVisitor
)

Constructs a new ModuleVisitor.

Method Summary

Modifier and TypeMethod and Description
public ModuleVisitor

Returns:

the module visitor to which this visitor must delegate method calls, or null.
getDelegate
()

The module visitor to which this visitor must delegate method calls.

public void
visitEnd()

Visits the end of the module.

public void
visitExport(final String
the internal name of the exported package (see Type#getInternalName()).
packaze
,
final int
the access flag of the exported package, valid values are among ACC_SYNTHETIC and ACC_MANDATED.
access
,
final String...
the fully qualified names (using dots) of the modules that can access the public classes of the exported package, or null.
modules
)

Visit an exported package of the current module.

public void
visitMainClass(final String
the internal name of the main class of the current module (see Type#getInternalName()).
mainClass
)

Visit the main class of the current module.

public void
visitOpen(final String
the internal name of the opened package (see Type#getInternalName()).
packaze
,
final int
the access flag of the opened package, valid values are among ACC_SYNTHETIC and ACC_MANDATED.
access
,
final String...
the fully qualified names (using dots) of the modules that can use deep reflection to the classes of the open package, or null.
modules
)

Visit an open package of the current module.

public void
visitPackage(final String
the internal name of a package (see Type#getInternalName()).
packaze
)

Visit a package of the current module.

public void
visitProvide(final String
the internal name of the service (see Type#getInternalName()).
service
,
final String...
the internal names (see Type#getInternalName()) of the implementations of the service (there is at least one provider).
providers
)

Visit an implementation of a service.

public void
visitRequire(final String
the fully qualified name (using dots) of the dependence.
module
,
final int
the access flag of the dependence among ACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC and ACC_MANDATED.
access
,
final String
the module version at compile time, or null.
version
)

Visits a dependence of the current module.

public void
visitUse(final String
the internal name of the service (see Type#getInternalName()).
service
)

Visit a service used by the current module.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

apiback to summary
protected final int api

The ASM API version implemented by this visitor. The value of this field must be one of Opcodes#ASM6 or Opcodes#ASM7.

mvback to summary
protected ModuleVisitor mv

The module visitor to which this visitor must delegate method calls. May be null.

Constructor Detail

ModuleVisitorback to summary
protected ModuleVisitor(final int api)

Constructs a new ModuleVisitor.

Parameters
api:int

the ASM API version implemented by this visitor. Must be one of Opcodes#ASM6 or Opcodes#ASM7.

ModuleVisitorback to summary
protected ModuleVisitor(final int api, final ModuleVisitor moduleVisitor)

Constructs a new ModuleVisitor.

Parameters
api:int

the ASM API version implemented by this visitor. Must be one of Opcodes#ASM6 or Opcodes#ASM7.

moduleVisitor:ModuleVisitor

the module visitor to which this visitor must delegate method calls. May be null.

Method Detail

getDelegateback to summary
public ModuleVisitor getDelegate()

The module visitor to which this visitor must delegate method calls. May be null.

Returns:ModuleVisitor

the module visitor to which this visitor must delegate method calls, or null.

visitEndback to summary
public void visitEnd()

Visits the end of the module. This method, which is the last one to be called, is used to inform the visitor that everything have been visited.

visitExportback to summary
public void visitExport(final String packaze, final int access, final String... modules)

Visit an exported package of the current module.

Parameters
packaze:String

the internal name of the exported package (see Type#getInternalName()).

access:int

the access flag of the exported package, valid values are among ACC_SYNTHETIC and ACC_MANDATED.

modules:String[]

the fully qualified names (using dots) of the modules that can access the public classes of the exported package, or null.

visitMainClassback to summary
public void visitMainClass(final String mainClass)

Visit the main class of the current module.

Parameters
mainClass:String

the internal name of the main class of the current module (see Type#getInternalName()).

visitOpenback to summary
public void visitOpen(final String packaze, final int access, final String... modules)

Visit an open package of the current module.

Parameters
packaze:String

the internal name of the opened package (see Type#getInternalName()).

access:int

the access flag of the opened package, valid values are among ACC_SYNTHETIC and ACC_MANDATED.

modules:String[]

the fully qualified names (using dots) of the modules that can use deep reflection to the classes of the open package, or null.

visitPackageback to summary
public void visitPackage(final String packaze)

Visit a package of the current module.

Parameters
packaze:String

the internal name of a package (see Type#getInternalName()).

visitProvideback to summary
public void visitProvide(final String service, final String... providers)

Visit an implementation of a service.

Parameters
service:String

the internal name of the service (see Type#getInternalName()).

providers:String[]

the internal names (see Type#getInternalName()) of the implementations of the service (there is at least one provider).

visitRequireback to summary
public void visitRequire(final String module, final int access, final String version)

Visits a dependence of the current module.

Parameters
module:String

the fully qualified name (using dots) of the dependence.

access:int

the access flag of the dependence among ACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC and ACC_MANDATED.

version:String

the module version at compile time, or null.

visitUseback to summary
public void visitUse(final String service)

Visit a service used by the current module. The name must be the internal name of an interface or a class.

Parameters
service:String

the internal name of the service (see Type#getInternalName()).