本文整理汇总了Java中gate.creole.AbstractResource类的典型用法代码示例。如果您正苦于以下问题:Java AbstractResource类的具体用法?Java AbstractResource怎么用?Java AbstractResource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractResource类属于gate.creole包,在下文中一共展示了AbstractResource类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setParameterValue
import gate.creole.AbstractResource; //导入依赖的package包/类
/**
* Sets the value for a specified parameter.
*
* @param paramaterName the name for the parameteer
* @param parameterValue the value the parameter will receive
*/
@Override
public void setParameterValue(String paramaterName, Object parameterValue)
throws ResourceInstantiationException{
// get the beaninfo for the resource bean, excluding data about Object
BeanInfo resBeanInf = null;
try {
resBeanInf = Introspector.getBeanInfo(this.getClass(), Object.class);
} catch(Exception e) {
throw new ResourceInstantiationException(
"Couldn't get bean info for resource " + this.getClass().getName()
+ Strings.getNl() + "Introspector exception was: " + e
);
}
AbstractResource.setParameterValue(this, resBeanInf, paramaterName, parameterValue);
}
示例2: forgetClassLoader
import gate.creole.AbstractResource; //导入依赖的package包/类
/**
* Causes the specified classloader to be forgotten, making it and all
* the class definitions loaded by it available for garbage collection
*
* @param id the id of the classloader to forget
*/
public void forgetClassLoader(String id) {
GateClassLoader gcl;
synchronized(childClassLoaders) {
gcl = childClassLoaders.remove(id);
}
if(gcl != null && !gcl.isIsolated()) {
// in theory this shouldn't be needed as the Introspector uses
// soft references if we move to requiring Java 8 it should be
// safe to drop this call
Introspector.flushCaches();
AbstractResource.flushBeanInfoCache();
}
}
示例3: setParameterValue
import gate.creole.AbstractResource; //导入依赖的package包/类
/**
* Sets the value for a specified parameter.
*
* @param paramaterName the name for the parameteer
* @param parameterValue the value the parameter will receive
*/
@Override
public void setParameterValue(String paramaterName, Object parameterValue)
throws ResourceInstantiationException {
// get the beaninfo for the resource bean, excluding data about
// Object
BeanInfo resBeanInf = null;
try {
resBeanInf = Introspector.getBeanInfo(this.getClass(), Object.class);
}
catch(Exception e) {
throw new ResourceInstantiationException(
"Couldn't get bean info for resource "
+ this.getClass().getName() + Strings.getNl()
+ "Introspector exception was: " + e);
}
AbstractResource.setParameterValue(this, resBeanInf, paramaterName,
parameterValue);
}
示例4: getParameterValue
import gate.creole.AbstractResource; //导入依赖的package包/类
/**
* Gets the value of a parameter of this resource.
* @param paramaterName the name of the parameter
* @return the current value of the parameter
*/
@Override
public Object getParameterValue(String paramaterName)
throws ResourceInstantiationException{
return AbstractResource.getParameterValue(this, paramaterName);
}
示例5: setParameterValues
import gate.creole.AbstractResource; //导入依赖的package包/类
/**
* Sets the values for more parameters in one step.
*
* @param parameters a feature map that has paramete names as keys and
* parameter values as values.
*/
@Override
public void setParameterValues(FeatureMap parameters)
throws ResourceInstantiationException{
AbstractResource.setParameterValues(this, parameters);
}
示例6: getParameterValue
import gate.creole.AbstractResource; //导入依赖的package包/类
/**
* Gets the value of a parameter of this resource.
*
* @param paramaterName the name of the parameter
* @return the current value of the parameter
*/
@Override
public Object getParameterValue(String paramaterName)
throws ResourceInstantiationException {
return AbstractResource.getParameterValue(this, paramaterName);
}
示例7: setParameterValues
import gate.creole.AbstractResource; //导入依赖的package包/类
/**
* Sets the values for more parameters in one step.
*
* @param parameters a feature map that has paramete names as keys and
* parameter values as values.
*/
@Override
public void setParameterValues(FeatureMap parameters)
throws ResourceInstantiationException {
AbstractResource.setParameterValues(this, parameters);
}