Package org.eclipse.sisu.space
Class SisuIndex
java.lang.Object
org.eclipse.sisu.space.SisuIndex
- All Implemented Interfaces:
ClassVisitor,SpaceVisitor
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.
- See Also:
-
Field Summary
Fields inherited from interface org.eclipse.sisu.space.ClassVisitor
NON_INSTANTIABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddClassToIndex(Object anno, Object clazz) Adds a new annotated class entry to the index.final voidenterClass(int modifiers, String name, String _extends, String[] _implements) Enters the class definition.final voidenterSpace(ClassSpace _space) Enters the class space.protected final voidWrites the current index as a series of tables.protected ReaderCreates a new reader for the given input path.protected WriterCreates a new writer for the given output path.final voidindex(ClassSpace _space) protected voidReports an informational message.final voidLeaves the class definition.final voidLeaves the class space.static voidfinal AnnotationVisitorvisitAnnotation(String desc) Visits an annotation declared on the class.final ClassVisitorvisitClass(URL url) Visits a class resource in the class space.protected voidReports a warning message.
-
Constructor Details
-
SisuIndex
-
-
Method Details
-
main
-
index
-
enterSpace
Description copied from interface:SpaceVisitorEnters the class space.- Specified by:
enterSpacein interfaceSpaceVisitor- Parameters:
_space- The class space
-
visitClass
Description copied from interface:SpaceVisitorVisits a class resource in the class space.- Specified by:
visitClassin interfaceSpaceVisitor- Parameters:
url- The class resource URL- Returns:
- Class visitor;
nullif it is not interested in visiting the class
-
enterClass
Description copied from interface:ClassVisitorEnters the class definition.- Specified by:
enterClassin interfaceClassVisitor- Parameters:
modifiers- The access modifiersname- The internal name, such as "javax/inject/Provider"_extends- Extends this superclass_implements- Implements these interfaces
-
visitAnnotation
Description copied from interface:ClassVisitorVisits an annotation declared on the class.- Specified by:
visitAnnotationin interfaceClassVisitor- Parameters:
desc- The JVM descriptor for the annotation class, such as "Ljavax/inject/Qualifier;"- Returns:
- Annotation visitor;
nullif it is not interested in visiting the annotation - See Also:
-
leaveClass
public final void leaveClass()Description copied from interface:ClassVisitorLeaves the class definition.- Specified by:
leaveClassin interfaceClassVisitor
-
leaveSpace
public final void leaveSpace()Description copied from interface:SpaceVisitorLeaves the class space.- Specified by:
leaveSpacein interfaceSpaceVisitor
-
info
Reports an informational message.- Parameters:
message- The message
-
warn
Reports a warning message.- Parameters:
message- The message
-
getReader
Creates a new reader for the given input path.- Parameters:
path- The input path- Returns:
- The relevant reader
- Throws:
IOException
-
getWriter
Creates a new writer for the given output path.- Parameters:
path- The output path- Returns:
- The relevant writer
- Throws:
IOException
-
addClassToIndex
Adds a new annotated class entry to the index.- Parameters:
anno- The annotation nameclazz- The class name
-
flushIndex
protected final void flushIndex()Writes the current index as a series of tables.
-