当前位置: 首页>>代码示例>>Java>>正文


Java F类代码示例

本文整理汇总了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();
        }
    });
}
 
开发者ID:pubfactory,项目名称:tapestry-compat,代码行数:18,代码来源:AbstractIncludeWorker.java

示例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();

       }
	
}
 
开发者ID:got5,项目名称:tapestry5-d3,代码行数:34,代码来源:DimpleStack.java

示例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();

       }
	
}
 
开发者ID:got5,项目名称:tapestry5-d3,代码行数:34,代码来源:D3Stack.java

示例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();
}
 
开发者ID:vladaspasic,项目名称:tapestry-oauth,代码行数:12,代码来源:OAuthClientProviderImpl.java

示例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);
}
 
开发者ID:pubfactory,项目名称:tapestry-compat,代码行数:13,代码来源:AbstractIncludeWorker.java

示例6: expandPaths

import org.apache.tapestry5.func.F; //导入依赖的package包/类
private String[] expandPaths(String[] paths)
{
    return F.flow(paths).map(expandSymbols).toArray(String.class);
}
 
开发者ID:pubfactory,项目名称:tapestry-compat,代码行数:5,代码来源:AbstractIncludeWorker.java


注:本文中的org.apache.tapestry5.func.F类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。