public final class ImageResourceGenerator extends AbstractResourceGenerator implements SupportsGeneratorResultCaching
STRIP_COMMENTS
Constructor and Description |
---|
ImageResourceGenerator() |
Modifier and Type | Method and Description |
---|---|
String |
createAssignment(TreeLogger logger,
ResourceContext context,
JMethod method)
Produce the right-hand-side of a Java assignment expression to provide the
singleton instance object for a particular resource.
|
void |
createFields(TreeLogger logger,
ResourceContext context,
ClientBundleFields fields)
We use this as a signal that we have received all image methods and can now
create the bundled images.
|
void |
init(TreeLogger logger,
ResourceContext context)
A no-op implementation.
|
void |
prepare(TreeLogger logger,
ResourceContext context,
ClientBundleRequirements requirements,
JMethod method)
Process each image method.
|
finish
public String createAssignment(TreeLogger logger, ResourceContext context, JMethod method) throws UnableToCompleteException
ResourceGenerator
Example:
new MySampleResource() { public Foo getFoo() { ... } }
createAssignment
in interface ResourceGenerator
createAssignment
in class AbstractResourceGenerator
UnableToCompleteException
public void createFields(TreeLogger logger, ResourceContext context, ClientBundleFields fields) throws UnableToCompleteException
createFields
in interface ResourceGenerator
createFields
in class AbstractResourceGenerator
UnableToCompleteException
public void init(TreeLogger logger, ResourceContext context)
AbstractResourceGenerator
init
in interface ResourceGenerator
init
in class AbstractResourceGenerator
public void prepare(TreeLogger logger, ResourceContext context, ClientBundleRequirements requirements, JMethod method) throws UnableToCompleteException
prepare
in interface ResourceGenerator
prepare
in class AbstractResourceGenerator
UnableToCompleteException
Copyright © 2018. All rights reserved.