本文整理匯總了Java中com.google.gwt.core.ext.GeneratorContext.getPropertyOracle方法的典型用法代碼示例。如果您正苦於以下問題:Java GeneratorContext.getPropertyOracle方法的具體用法?Java GeneratorContext.getPropertyOracle怎麽用?Java GeneratorContext.getPropertyOracle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.core.ext.GeneratorContext
的用法示例。
在下文中一共展示了GeneratorContext.getPropertyOracle方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: Mvp4gConfiguration
import com.google.gwt.core.ext.GeneratorContext; //導入方法依賴的package包/類
/**
* Contruct a Mvp4gConfiguration object
*
* @param logger logger of the GWT compiler
* @param context context of the GWT compiler
*/
public Mvp4gConfiguration(TreeLogger logger,
GeneratorContext context) {
this.logger = logger;
this.oracle = context.getTypeOracle();
this.propertyOracle = context.getPropertyOracle();
}
示例2: getStorageTypeFinders
import com.google.gwt.core.ext.GeneratorContext; //導入方法依賴的package包/類
private static List<StorageTypeFinder> getStorageTypeFinders(GeneratorContext context, TreeLogger logger) throws UnableToCompleteException {
final List<StorageTypeFinder> typeFinders = new ArrayList<>();
JClassType keyProviderIntf = context.getTypeOracle().findType(StorageKeyProvider.class.getName());
if(keyProviderIntf.getSubtypes() != null && keyProviderIntf.getSubtypes().length > 1){
typeFinders.add(new TypeProviderFinder(context, logger));
}
PropertyOracle propertyOracle = context.getPropertyOracle();
try {
ConfigurationProperty property = propertyOracle.getConfigurationProperty(PROP_TYPE_FINDER);
String value = property == null ? TYPE_FINDER_VALUES.get(0) : property.getValues().get(0).toLowerCase();
switch(TYPE_FINDER_VALUES.indexOf(value)){
case 0:
typeFinders.add(new TypeRpcFinder(context, logger));
break;
case 1:
typeFinders.add(new TypeXmlFinder(context, logger));
break;
case 2:
typeFinders.add(new TypeRpcFinder(context, logger));
typeFinders.add(new TypeXmlFinder(context, logger));
break;
default:
break;
}
} catch (BadPropertyValueException e) {
logger.branch(TreeLogger.DEBUG, "Could not find property " + PROP_TYPE_FINDER, e);
}
return typeFinders;
}