public abstract class AbstractResourceGenerator extends Object implements ResourceGenerator
ResourceGeneratorUtil
Modifier and Type | Field and Description |
---|---|
protected static boolean |
STRIP_COMMENTS |
Constructor and Description |
---|
AbstractResourceGenerator() |
Modifier and Type | Method and Description |
---|---|
abstract 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)
A no-op implementation.
|
void |
finish(TreeLogger logger,
ResourceContext context)
A no-op implementation.
|
void |
init(TreeLogger logger,
ResourceContext context)
A no-op implementation.
|
void |
prepare(TreeLogger logger,
ResourceContext context,
ClientBundleRequirements requirements,
JMethod method)
A no-op implementation.
|
public abstract String createAssignment(TreeLogger logger, ResourceContext context, JMethod method) throws UnableToCompleteException
ResourceGenerator
Example:
new MySampleResource() { public Foo getFoo() { ... } }
createAssignment
in interface ResourceGenerator
UnableToCompleteException
public void createFields(TreeLogger logger, ResourceContext context, ClientBundleFields fields) throws UnableToCompleteException
createFields
in interface ResourceGenerator
UnableToCompleteException
public void finish(TreeLogger logger, ResourceContext context) throws UnableToCompleteException
finish
in interface ResourceGenerator
UnableToCompleteException
public void init(TreeLogger logger, ResourceContext context) throws UnableToCompleteException
init
in interface ResourceGenerator
UnableToCompleteException
public void prepare(TreeLogger logger, ResourceContext context, ClientBundleRequirements requirements, JMethod method) throws UnableToCompleteException
prepare
in interface ResourceGenerator
UnableToCompleteException
Copyright © 2018. All rights reserved.