本文整理汇总了Java中org.apache.tapestry5.func.F类的典型用法代码示例。如果您正苦于以下问题:Java F类的具体用法?Java F怎么用?Java F使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
F类属于org.apache.tapestry5.func包,在下文中一共展示了F类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addMethodAssetOperationAdvice
import org.apache.tapestry5.func.F; //导入依赖的package包/类
private void addMethodAssetOperationAdvice(PlasticMethod method, final FieldHandle access,
final Worker<Asset> operation)
{
method.addAdvice(new MethodAdvice()
{
@Override
public void advise(MethodInvocation invocation)
{
Asset[] assets = (Asset[]) access.get(invocation.getInstance());
F.flow(assets).each(operation);
invocation.proceed();
}
});
}
示例2: DimpleStack
import org.apache.tapestry5.func.F; //导入依赖的package包/类
public DimpleStack(
@Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode,
final AssetSource assetSource) {
super();
this.productionMode = productionMode;
final Mapper<String, Asset> pathToAsset = new Mapper<String, Asset>()
{
public Asset map(String path)
{
return assetSource.getExpandedAsset(path);
}
};
stylesheetStack = CollectionFactory.newList();
if (productionMode) {
javaScriptStack = F
.flow("${" + D3SymbolConstants.JQUERY_D3_ASSET_PATH +"}/dimple.min.js")
.map(pathToAsset).toList();
} else {
javaScriptStack = F
.flow("${" + D3SymbolConstants.JQUERY_D3_ASSET_PATH +"}/dimple.js")
.map(pathToAsset).toList();
}
}
示例3: D3Stack
import org.apache.tapestry5.func.F; //导入依赖的package包/类
public D3Stack(
@Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode,
final AssetSource assetSource) {
super();
this.productionMode = productionMode;
final Mapper<String, Asset> pathToAsset = new Mapper<String, Asset>()
{
public Asset map(String path)
{
return assetSource.getExpandedAsset(path);
}
};
stylesheetStack = CollectionFactory.newList();
if (productionMode) {
javaScriptStack = F
.flow("${" + D3SymbolConstants.JQUERY_D3_ASSET_PATH +"}/d3.min.js")
.map(pathToAsset).toList();
} else {
javaScriptStack = F
.flow("${" + D3SymbolConstants.JQUERY_D3_ASSET_PATH +"}/d3.js")
.map(pathToAsset).toList();
}
}
示例4: get
import org.apache.tapestry5.func.F; //导入依赖的package包/类
@Override
public OAuthClient get(final Class clientClass) {
return F.flow(config).filter(new Predicate<OAuthClient>() {
public boolean accept(OAuthClient client) {
return client.getClass().equals(clientClass);
};
}).first();
}
示例5: convertPathsToAssetArray
import org.apache.tapestry5.func.F; //导入依赖的package包/类
private Asset[] convertPathsToAssetArray(final Resource baseResource, final Locale locale, String[] assetPaths)
{
return F.flow(assetPaths).map(new Mapper<String, Asset>()
{
@Override
public Asset map(String assetPath)
{
return assetSource.getAsset(baseResource, assetPath, locale);
}
}).toArray(Asset.class);
}
示例6: expandPaths
import org.apache.tapestry5.func.F; //导入依赖的package包/类
private String[] expandPaths(String[] paths)
{
return F.flow(paths).map(expandSymbols).toArray(String.class);
}