@Internal public abstract class AbstractClassWriterOutputVisitor extends Object implements ClassWriterOutputVisitor
ClassWriterOutputVisitor
interface that deals with service descriptors in a
common way across Java and Groovy.Modifier | Constructor and Description |
---|---|
|
AbstractClassWriterOutputVisitor()
Compatibility constructor.
|
protected |
AbstractClassWriterOutputVisitor(boolean isWriteOnFinish)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
finish()
Finish writing and flush any service entries to disk.
|
Map<String,Set<String>> |
getServiceEntries()
The META-INF/services entries to write.
|
void |
visitServiceDescriptor(String type,
String classname)
Allows adding a class that will be written to the
META-INF/services file under the given type and class
name. |
void |
writeServiceEntries(Map<String,Set<String>> serviceEntries,
Element... originatingElements)
Writes the service entries.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitClass, visitClass, visitClass, visitGeneratedFile, visitMetaInfFile, visitMetaInfFile, visitServiceDescriptor
protected AbstractClassWriterOutputVisitor(boolean isWriteOnFinish)
isWriteOnFinish
- Is this the eclipse compilerpublic AbstractClassWriterOutputVisitor()
public final Map<String,Set<String>> getServiceEntries()
ClassWriterOutputVisitor
getServiceEntries
in interface ClassWriterOutputVisitor
public final void visitServiceDescriptor(String type, String classname)
ClassWriterOutputVisitor
META-INF/services
file under the given type and class
name.visitServiceDescriptor
in interface ClassWriterOutputVisitor
type
- the fully qualified service nameclassname
- the fully qualified classnamepublic final void finish()
ClassWriterOutputVisitor
finish
in interface ClassWriterOutputVisitor