public class GssResourceGenerator extends AbstractCssResourceGenerator implements SupportsGeneratorResultCaching
STRIP_COMMENTS
Constructor and Description |
---|
GssResourceGenerator() |
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.
|
protected String |
getCssExpression(TreeLogger logger,
ResourceContext context,
JMethod method)
Returns the java expression that contains the compiled CSS.
|
static String |
getImportPrefix(JClassType importType)
Returns the import prefix for a type, including the trailing hyphen.
|
void |
init(TreeLogger logger,
ResourceContext context)
A no-op implementation.
|
void |
prepare(TreeLogger logger,
ResourceContext context,
ClientBundleRequirements requirements,
JMethod method)
A no-op implementation.
|
isReturnTypeString, writeEnsureInjected, writeGetName, writeGetText, writeSimpleGetter
createFields, finish
public static String getImportPrefix(JClassType importType)
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 init(TreeLogger logger, ResourceContext context) throws UnableToCompleteException
AbstractResourceGenerator
init
in interface ResourceGenerator
init
in class AbstractResourceGenerator
UnableToCompleteException
public void prepare(TreeLogger logger, ResourceContext context, ClientBundleRequirements requirements, JMethod method) throws UnableToCompleteException
AbstractResourceGenerator
prepare
in interface ResourceGenerator
prepare
in class AbstractResourceGenerator
UnableToCompleteException
protected String getCssExpression(TreeLogger logger, ResourceContext context, JMethod method) throws UnableToCompleteException
AbstractCssResourceGenerator
getCssExpression
in class AbstractCssResourceGenerator
UnableToCompleteException
Copyright © 2018. All rights reserved.