public String map(String element) { return symbolSource.expandSymbols(element); } };
@Override public String transform(String input) { return symbolSource.expandSymbols(input); } }
protected final void train_expandSymbols(SymbolSource source, String input, String expanded) { expect(source.expandSymbols(input)).andReturn(expanded); }
public Asset getExpandedAsset(String path) { return getUnlocalizedAsset(symbolSource.expandSymbols(path)); }
protected final void train_expandSymbols(SymbolSource source, String input, String expanded) { expect(source.expandSymbols(input)).andReturn(expanded); }
@Override public String upcase(String input) { return source.expandSymbols(input).toUpperCase(); } };
private String getSymbolExpandedValueFromCache(String key, String cacheKey, ValueLocator valueLocator) { if (cache.containsKey(cacheKey)) return cache.get(cacheKey); String value = valueLocator.valueForKey(key); if (value == null) { value = symbolSource.valueForSymbol(key); } else { value = symbolSource.expandSymbols(value); } cache.put(cacheKey, value); return value; }
@Override public String expandSymbols(String input) { lock.check(); // Again, a bit of work to avoid instantiating the SymbolSource until absolutely necessary. if (!InternalUtils.containsSymbols(input)) return input; return getSymbolSource().expandSymbols(input); }
@Override public String expandSymbols(String input) { lock.check(); // Again, a bit of work to avoid instantiating the SymbolSource until absolutely necessary. if (!InternalUtils.containsSymbols(input)) return input; return getSymbolSource().expandSymbols(input); }
String expanded = symbolSource.expandSymbols(path);
/** * Provides the asset. If the expression does not identify an asset domain, with a prefix, it is assumed to be a * path on the classpath, relative to the root of the classpath. * * @param objectType the type of object (which must be Object or Asset) * @param locator not used */ public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator) { Path path = annotationProvider.getAnnotation(Path.class); if (path == null) return null; String expanded = symbolSource.expandSymbols(path.value()); Asset asset = source.getAsset(null, expanded, null); return typeCoercer.coerce(asset, objectType); } }
@Override public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator) { Value annotation = annotationProvider.getAnnotation(Value.class); if (annotation == null) return null; String value = annotation.value(); Object expanded = symbolSource.expandSymbols(value); IntermediateType intermediate = annotationProvider.getAnnotation(IntermediateType.class); if (intermediate != null) expanded = typeCoercer.coerce(expanded, intermediate.value()); return typeCoercer.coerce(expanded, objectType); } }
@Override public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator) { Value annotation = annotationProvider.getAnnotation(Value.class); if (annotation == null) return null; String value = annotation.value(); Object expanded = symbolSource.expandSymbols(value); IntermediateType intermediate = annotationProvider.getAnnotation(IntermediateType.class); if (intermediate != null) expanded = typeCoercer.coerce(expanded, intermediate.value()); return typeCoercer.coerce(expanded, objectType); } }