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


Java CustomTag类代码示例

本文整理汇总了Java中com.allaire.cfx.CustomTag的典型用法代码示例。如果您正苦于以下问题:Java CustomTag类的具体用法?Java CustomTag怎么用?Java CustomTag使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CustomTag类属于com.allaire.cfx包,在下文中一共展示了CustomTag类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCustomTag

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
@Override
public synchronized CustomTag getCustomTag(String name) throws CFXTagException {
	name=name.toLowerCase();
	
	Object o=classes.get(name);
	if(o==null) {
		Set<String> set = classes.keySet();
		String names = ListUtil.arrayToList(set.toArray(new String[set.size()]),",");
		
		throw new CFXTagException("there is no Custom Tag (CFX) with name ["+name+"], available Custom Tags are ["+names+"]");
	}
	CFXTagClass ctc=(CFXTagClass) o;
	CustomTag ct = ctc.newInstance();
	//if(!(o instanceof CustomTag))throw new CFXTagException("["+name+"] is not of type ["+CustomTag.class.getName()+"]");
	return ct;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:17,代码来源:CFXTagPoolImpl.java

示例2: verifyCFX

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
public void verifyCFX(String name) throws PageException {
   	CFXTagPool pool=config.getCFXTagPool();
	CustomTag ct=null;
	try {
		ct = pool.getCustomTag(name);
	} 
       catch (CFXTagException e) {
		throw Caster.toPageException(e);
	}
       finally {
       	if(ct!=null)pool.releaseCustomTag(ct);
       }
	
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:15,代码来源:ConfigWebAdmin.java

示例3: verifyJavaCFX

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
public void verifyJavaCFX(String name,String strClass) throws PageException {
  	try {
  		Class clazz = ClassUtil.loadClass(config.getClassLoader(),strClass);
	if(!Reflector.isInstaneOf(clazz, CustomTag.class))
		throw new ExpressionException("class ["+strClass+"] must implement interface ["+CustomTag.class.getName()+"]");
      } 
      catch (ClassException e) {
      	throw Caster.toPageException(e);
}
      
      if(StringUtil.startsWithIgnoreCase(name,"cfx_"))name=name.substring(4);
      if(StringUtil.isEmpty(name))
          throw new ExpressionException("class name can't be a empty value");
  }
 
开发者ID:lucee,项目名称:Lucee4,代码行数:15,代码来源:ConfigWebAdmin.java

示例4: newInstance

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
@Override
public CustomTag newInstance() throws CFXTagException {
	try {
		return _newInstance();
	} catch (Throwable e) {
       	ExceptionUtil.rethrowIfNecessary(e);
		throw new CFXTagException(e);
	}
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:10,代码来源:JavaCFXTagClass.java

示例5: getClazz

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
/**
   * @return Returns the clazz.
   * @throws ClassNotFoundException 
   */
  public Class<CustomTag> getClazz() throws ClassNotFoundException {
      if(clazz==null) {
          clazz=this.getClass().getClassLoader().loadClass(strClass);
}
      return clazz;
  }
 
开发者ID:lucee,项目名称:Lucee4,代码行数:11,代码来源:JavaCFXTagClass.java

示例6: isValid

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
@Override
public boolean isValid() {
    try {
        return Reflector.isInstaneOf(getClazz(),CustomTag.class);
    } 
    catch (ClassNotFoundException e) {
        return false;
    }
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:10,代码来源:JavaCFXTagClass.java

示例7: newInstance

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
@Override
public CustomTag newInstance() throws CFXTagException {
	try {
		return _newInstance();
	} catch (Throwable e) {
		ExceptionUtil.rethrowIfNecessary(e);
		throw new CFXTagException(e);
	}
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:10,代码来源:JavaCFXTagClass.java

示例8: isValid

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
@Override
public boolean isValid() {
    try {
        return Reflector.isInstaneOf(getClazz(),CustomTag.class);
    } 
    catch (Exception e) {
        return false;
    }
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:10,代码来源:JavaCFXTagClass.java

示例9: runJavaCFX

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
private void runJavaCFX( cfSession _Session, boolean debugOn, String className, int reloadType )
	throws cfmRunTimeException
{
	try 
	{
		CustomTag customJavaClass = getCustomTag( className, reloadType );
		
		//--[ Create the necessary parameters
		sessionRequest	sRequest  = new sessionRequest( _Session, evaluateAttributes( _Session ), debugOn );
		sessionResponse	sResponse = new sessionResponse( _Session, debugOn );
				
		long startTime = System.currentTimeMillis();	// for debug timings
			
		customJavaClass.processRequest( sRequest, sResponse );

		long processingTime = System.currentTimeMillis() - startTime;
				
		if ( debugOn ) 
		{
			_Session.write( "<hr><b>" + className + "</b> Execution Time = " + processingTime + " ms <br><hr>" );
		}	
	} 
	catch( java.lang.Exception E ) 
	{		
		cfCatchData	catchData = new cfCatchData( _Session );
		catchData.setType( "Application" );
		catchData.setMessage( "CFCFX: " + tagName );
		catchData.setDetail( E.toString() );
		throw newRunTimeException( catchData );
	}
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:32,代码来源:cfCFX.java

示例10: getCustomTag

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
private CustomTag getCustomTag( String className, int reloadType ) throws Exception 
{
	//--[ Try to find the class
	getJavaCFXClass( className, reloadType );
	//--[ return an instance of the class
	return (CustomTag)cfxClass.newInstance();
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:8,代码来源:cfCFX.java

示例11: _newInstance

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
public CustomTag _newInstance() throws ClassNotFoundException, InstantiationException, IllegalAccessException  {
	
	Object o=getClazz().newInstance();
	return (CustomTag)o;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:6,代码来源:JavaCFXTagClass.java

示例12: releaseCustomTag

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
@Override
public synchronized void releaseCustomTag(CustomTag ct) {
	//table.put(ct.getClass().toString(),ct);
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:5,代码来源:CFXTagPoolImpl.java

示例13: newInstance

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
@Override
public CustomTag newInstance() throws CFXTagException {
	return new CPPCustomTag(serverLibrary,procedure,keepAlive);
	
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:6,代码来源:CPPCFXTagClass.java

示例14: _newInstance

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
public CustomTag _newInstance() throws InstantiationException, IllegalAccessException, ClassException, BundleException  {
	
	Object o=getClazz().newInstance();
	return (CustomTag)o;
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:6,代码来源:JavaCFXTagClass.java

示例15: releaseCustomTag

import com.allaire.cfx.CustomTag; //导入依赖的package包/类
@Override
public void releaseCustomTag(CustomTag ct) {
	//table.put(ct.getClass().toString(),ct);
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:5,代码来源:CFXTagPoolImpl.java


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