public class AnnotationsResource extends AbstractResource
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationsResource.AnnotationsError
An exception indicating there was some problem with an annotation.
|
static class |
AnnotationsResource.ArgumentInfo
Class for argument information, used for export.
|
AbstractResource.MissingResourceException, AbstractResource.MultipleFormEntry, AbstractResource.ResourceEntry, AbstractResource.ResourceList, AbstractResource.SimpleEntry
matchLocale, REPORT_KEYS_THRESHOLD
Constructor and Description |
---|
AnnotationsResource(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.typeinfo.JClassType clazz,
GwtLocale locale,
boolean isConstants)
Create a resource that supplies data from i18n-related annotations.
|
Modifier and Type | Method and Description |
---|---|
void |
addToKeySet(Set<String> s) |
Iterable<AnnotationsResource.ArgumentInfo> |
argumentsIterator(String key) |
String |
getDescription(String key) |
AbstractResource.ResourceEntry |
getEntry(String key)
Returns an entry in this resource.
|
Collection<String> |
getExtensions(String key) |
static String |
getKey(com.google.gwt.core.ext.TreeLogger logger,
KeyGenerator keyGenerator,
com.google.gwt.core.ext.typeinfo.JMethod method,
boolean isConstants)
Returns the key for a given method.
|
static KeyGenerator |
getKeyGenerator(com.google.gwt.core.ext.typeinfo.JClassType targetClass)
Returns a suitable key generator for the specified class.
|
String |
getMeaning(String key) |
String |
getStringExt(String key,
String extension)
Get a key with an extension.
|
boolean |
notEmpty()
Returns true if this resource has any keys.
|
String |
toString() |
getExtendedKey, getRequiredString, getRequiredStringExt, getString, keySet, toVerboseString
public AnnotationsResource(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.typeinfo.JClassType clazz, GwtLocale locale, boolean isConstants) throws AnnotationsResource.AnnotationsError
logger
- clazz
- locale
- isConstants
- AnnotationsResource.AnnotationsError
- if there is a fatal error while processing
annotationspublic static String getKey(com.google.gwt.core.ext.TreeLogger logger, KeyGenerator keyGenerator, com.google.gwt.core.ext.typeinfo.JMethod method, boolean isConstants)
logger
- keyGenerator
- method
- isConstants
- public static KeyGenerator getKeyGenerator(com.google.gwt.core.ext.typeinfo.JClassType targetClass) throws AnnotationsResource.AnnotationsError
targetClass
- AnnotationsResource.AnnotationsError
- if a specified KeyGenerator cannot be createdpublic Iterable<AnnotationsResource.ArgumentInfo> argumentsIterator(String key)
public AbstractResource.ResourceEntry getEntry(String key)
AbstractResource
getEntry
in class AbstractResource
public Collection<String> getExtensions(String key)
getExtensions
in class AbstractResource
public String getStringExt(String key, String extension)
AbstractResource
getStringExt
in class AbstractResource
key
- to lookupextension
- extension of the key, nullablepublic boolean notEmpty()
AbstractResource
notEmpty
in class AbstractResource
public String toString()
toString
in class AbstractResource
Copyright © 2016. All rights reserved.