java.lang.Object | |
↳ | com.google.gwt.resources.ext.ResourceGeneratorUtil |
Utility methods for building ResourceGenerators.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Publish or override resources named by
ClientBundle.Source annotations. | |||||||||||
Returns the base filename of a resource.
| |||||||||||
Find all resources referenced by a method in a bundle.
| |||||||||||
Find all resources referenced by a method in a bundle.
| |||||||||||
Find all resources referenced by a method in a bundle.
| |||||||||||
Finds a method by following a dotted path interpreted as a series of no-arg
method invocations from an instance of a given root type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Publish or override resources named by ClientBundle.Source
annotations. This
method is intended to be called by Generators that create ClientBundle
instances and need to pass source data to the ClientBundle system that is
not accessible through the classpath.
resourceName | the path at which the contents of file
should be made available |
---|---|
file | the File whose contents are to be provided to the ClientBundle system |
Returns the base filename of a resource. The behavior is similar to the unix
command basename
.
resource | the URL of the resource |
---|
Find all resources referenced by a method in a bundle. The method's
ClientBundle.Source
annotation will be examined and the specified locations will
be expanded into URLs by which they may be accessed on the local system.
This method is sensitive to the locale
deferred-binding
property and will attempt to use a best-match lookup by removing locale
components.
Loading through a ClassLoader with this method is much slower than the
other findResources
methods which make use of the compiler's
ResourceOracle.
logger | a TreeLogger that will be used to report errors or warnings |
---|---|
classLoader | the ClassLoader to use when locating resources |
context | the ResourceContext in which the ResourceGenerator is operating |
method | the method to examine for ClientBundle.Source annotations |
defaultSuffixes | if the supplied method does not have any
ClientBundle.Source annotations, act as though a Source annotation was
specified, using the name of the method and each of supplied
extensions in the order in which they are specified |
ClientBundle.Source
annotation value defined on the
method.UnableToCompleteException | if ore or more of the sources could not
be found. The error will be reported via the logger
provided to this method
|
---|
Find all resources referenced by a method in a bundle. The method's
ClientBundle.Source
annotation will be examined and the specified locations will
be expanded into URLs by which they may be accessed on the local system.
This method is sensitive to the locale
deferred-binding
property and will attempt to use a best-match lookup by removing locale
components.
The compiler's ResourceOracle will be used to resolve resource locations. If the desired resource cannot be found in the ResourceOracle, this method will fall back to using the current thread's context ClassLoader. If it is necessary to alter the way in which resources are located, use the overload that accepts a ClassLoader.
logger | a TreeLogger that will be used to report errors or warnings |
---|---|
context | the ResourceContext in which the ResourceGenerator is operating |
method | the method to examine for ClientBundle.Source annotations |
defaultSuffixes | if the supplied method does not have any
ClientBundle.Source annotations, act as though a Source annotation was
specified, using the name of the method and each of supplied
extensions in the order in which they are specified |
ClientBundle.Source
annotation value defined on the
method.UnableToCompleteException | if ore or more of the sources could not
be found. The error will be reported via the logger
provided to this method
|
---|
Find all resources referenced by a method in a bundle. The method's
ClientBundle.Source
annotation will be examined and the specified locations will
be expanded into URLs by which they may be accessed on the local system.
This method is sensitive to the locale
deferred-binding
property and will attempt to use a best-match lookup by removing locale
components.
The compiler's ResourceOracle will be used to resolve resource locations. If the desired resource cannot be found in the ResourceOracle, this method will fall back to using the current thread's context ClassLoader. If it is necessary to alter the way in which resources are located, use the overload that accepts a ClassLoader.
If the method's return type declares the DefaultExtensions
annotation, the value of this annotation will be used to find matching
resource names if the method lacks a ClientBundle.Source
annotation.
logger | a TreeLogger that will be used to report errors or warnings |
---|---|
context | the ResourceContext in which the ResourceGenerator is operating |
method | the method to examine for ClientBundle.Source annotations |
ClientBundle.Source
annotation value defined on the
method.UnableToCompleteException | if ore or more of the sources could not
be found. The error will be reported via the logger
provided to this method
|
---|
Finds a method by following a dotted path interpreted as a series of no-arg method invocations from an instance of a given root type.
rootType | the type from which the search begins |
---|---|
pathElements | a sequence of no-arg method names |
expectedReturnType | the expected return type of the method to locate,
or null if no constraint on the return type is
necessary |
NotFoundException | if the requested method could not be found |
---|