public class

SisuIndex

extends Object
implements ClassVisitor SpaceVisitor
java.lang.Object
   ↳ org.eclipse.sisu.space.SisuIndex

Class Overview

Command-line utility that generates a qualified class index for a space-separated list of JARs.

The index consists of qualified class names listed in META-INF/sisu/javax.inject.Named.

Summary

[Expand]
Inherited Constants
From interface org.eclipse.sisu.space.ClassVisitor
Public Constructors
SisuIndex(File targetDirectory)
Public Methods
final void enterClass(int modifiers, String name, String _extends, String[] _implements)
Enters the class definition.
final void enterSpace(ClassSpace _space)
Enters the class space.
final void index(ClassSpace _space)
final void leaveClass()
Leaves the class definition.
final void leaveSpace()
Leaves the class space.
static void main(String[] args)
final AnnotationVisitor visitAnnotation(String desc)
Visits an annotation declared on the class.
final ClassVisitor visitClass(URL url)
Visits a class resource in the class space.
Protected Methods
synchronized final void addClassToIndex(Object anno, Object clazz)
Adds a new annotated class entry to the index.
synchronized final void flushIndex()
Writes the current index as a series of tables.
Reader getReader(String path)
Creates a new reader for the given input path.
Writer getWriter(String path)
Creates a new writer for the given output path.
void info(String message)
Reports an informational message.
void warn(String message)
Reports a warning message.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.eclipse.sisu.space.ClassVisitor
From interface org.eclipse.sisu.space.SpaceVisitor

Public Constructors

public SisuIndex (File targetDirectory)

Public Methods

public final void enterClass (int modifiers, String name, String _extends, String[] _implements)

Enters the class definition.

Parameters
modifiers The access modifiers
name The internal name, such as "javax/inject/Provider"
_extends Extends this superclass
_implements Implements these interfaces

public final void enterSpace (ClassSpace _space)

Enters the class space.

Parameters
_space The class space

public final void index (ClassSpace _space)

public final void leaveClass ()

Leaves the class definition.

public final void leaveSpace ()

Leaves the class space.

public static void main (String[] args)

public final AnnotationVisitor visitAnnotation (String desc)

Visits an annotation declared on the class.

Parameters
desc The JVM descriptor for the annotation class, such as "Ljavax/inject/Qualifier;"
Returns
  • Annotation visitor; null if it is not interested in visiting the annotation

public final ClassVisitor visitClass (URL url)

Visits a class resource in the class space.

Parameters
url The class resource URL
Returns
  • Class visitor; null if it is not interested in visiting the class

Protected Methods

protected final synchronized void addClassToIndex (Object anno, Object clazz)

Adds a new annotated class entry to the index.

Parameters
anno The annotation name
clazz The class name

protected final synchronized void flushIndex ()

Writes the current index as a series of tables.

protected Reader getReader (String path)

Creates a new reader for the given input path.

Parameters
path The input path
Returns
  • The relevant reader
Throws
IOException

protected Writer getWriter (String path)

Creates a new writer for the given output path.

Parameters
path The output path
Returns
  • The relevant writer
Throws
IOException

protected void info (String message)

Reports an informational message.

Parameters
message The message

protected void warn (String message)

Reports a warning message.

Parameters
message The message