Package org.eclipse.sisu.space
Class SisuIndex
java.lang.Object
org.eclipse.sisu.space.AbstractSisuIndex
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
FieldsModifier and TypeFieldDescriptionprivate String
private final QualifierCache
private ClassSpace
private final File
Fields inherited from class org.eclipse.sisu.space.AbstractSisuIndex
INDEX_FOLDER, NAMED, QUALIFIER
Fields inherited from interface org.eclipse.sisu.space.ClassVisitor
NON_INSTANTIABLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
enterClass
(int modifiers, String name, String _extends, String[] _implements) Enters the class definition.final void
enterSpace
(ClassSpace _space) Enters the class space.protected Reader
Creates a new reader for the given input path.protected Writer
Creates a new writer for the given output path.final void
index
(ClassSpace _space) protected void
Reports an informational message.final void
Leaves the class definition.final void
Leaves the class space.static void
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 void
Reports a warning message.Methods inherited from class org.eclipse.sisu.space.AbstractSisuIndex
addClassToIndex, flushIndex
-
Field Details
-
qualifierCache
-
targetDirectory
-
space
-
clazzName
-
-
Constructor Details
-
SisuIndex
-
-
Method Details
-
main
-
index
-
enterSpace
Description copied from interface:SpaceVisitor
Enters the class space.- Specified by:
enterSpace
in interfaceSpaceVisitor
- Parameters:
_space
- The class space
-
visitClass
Description copied from interface:SpaceVisitor
Visits a class resource in the class space.- Specified by:
visitClass
in interfaceSpaceVisitor
- Parameters:
url
- The class resource URL- Returns:
- Class visitor;
null
if it is not interested in visiting the class
-
enterClass
Description copied from interface:ClassVisitor
Enters the class definition.- Specified by:
enterClass
in 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:ClassVisitor
Visits an annotation declared on the class.- Specified by:
visitAnnotation
in interfaceClassVisitor
- 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 - See Also:
-
leaveClass
public final void leaveClass()Description copied from interface:ClassVisitor
Leaves the class definition.- Specified by:
leaveClass
in interfaceClassVisitor
-
leaveSpace
public final void leaveSpace()Description copied from interface:SpaceVisitor
Leaves the class space.- Specified by:
leaveSpace
in interfaceSpaceVisitor
-
info
Description copied from class:AbstractSisuIndex
Reports an informational message.- Specified by:
info
in classAbstractSisuIndex
- Parameters:
message
- The message
-
warn
Description copied from class:AbstractSisuIndex
Reports a warning message.- Specified by:
warn
in classAbstractSisuIndex
- Parameters:
message
- The message
-
getReader
Description copied from class:AbstractSisuIndex
Creates a new reader for the given input path.- Specified by:
getReader
in classAbstractSisuIndex
- Parameters:
path
- The input path- Returns:
- The relevant reader
- Throws:
IOException
-
getWriter
Description copied from class:AbstractSisuIndex
Creates a new writer for the given output path.- Specified by:
getWriter
in classAbstractSisuIndex
- Parameters:
path
- The output path- Returns:
- The relevant writer
- Throws:
IOException
-