本文整理匯總了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);
}