| Constructor and Description |
|---|
AutoProxy.Builder(Collection<File> inputHeaders,
Collection<File> inputSources,
File outputHeaders,
File outputSources,
ClassPath classPath)
Creates a new AutoProxy.
|
| Modifier and Type | Method and Description |
|---|---|
AutoProxy.Builder |
accessibility(ProxyGenerator.AccessibilityType accessibility)
Indicates the method accessibility to expose.
|
AutoProxy.Builder |
exportSymbols(boolean value)
Indicates if proxy symbols should be exported (i.e.
|
AutoProxy.Builder |
extraDependency(TypeName dependency)
Specifies classes that should be exported in spite of the fact that they are not referenced by input files.
|
void |
generateProxies()
Generates the proxies.
|
AutoProxy.Builder |
minimizeDependencies(boolean value)
Indicates whether classes should be exported even if they are not referenced by the input files.
|
public AutoProxy.Builder(Collection<File> inputHeaders, Collection<File> inputSources, File outputHeaders, File outputSources, ClassPath classPath) throws IllegalArgumentException
inputHeaders - The directories to recursively search for header filesinputSources - The directories to recursively search for source filesoutputHeaders - The directory to write new proxy header files tooutputSources - The directory to write new proxy source files toclassPath - The path to search for class files when resolving class dependenciesIllegalArgumentException - If inputHeaders, inputSources, outputHeaders,
outputSources, extraDependencies or classPath
are null. Or if one of the inputHeaders/inputSources
elements is not a directory or does not exist.public AutoProxy.Builder accessibility(ProxyGenerator.AccessibilityType accessibility)
accessibility - The method accessibility to expose. The default is AccessibilityType.PUBLIC.public AutoProxy.Builder minimizeDependencies(boolean value)
value - true if the minimum set of classes should be generated (superclass, interfaces and
any classes used by the input files). false if all class dependencies (arguments,
return values, and fields) should be exported. The latter is used to generate proxies for a Java library,
where the set of input files are not known ahead of time. The default is true.public AutoProxy.Builder extraDependency(TypeName dependency)
minimizeDependencies is true.
When generating proxies for a Java library there is no way of knowing what classes will be referenced ahead of
time so you must use this mechanism to specify any classes above those that are automatically determined.dependency - A class that should be exportedpublic AutoProxy.Builder exportSymbols(boolean value)
value - true if proxy symbols should be exported. The default is false.public void generateProxies()
throws IOException,
ClassNotFoundException
IOException - if an I/O exception occursClassNotFoundException - if a class file cannot be found while generating proxiesCopyright © 2012. All Rights Reserved.