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