當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。