本文整理了Java中org.apache.velocity.runtime.RuntimeSingleton.getProperty
方法的一些代码示例,展示了RuntimeSingleton.getProperty
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RuntimeSingleton.getProperty
方法的具体详情如下:
包路径:org.apache.velocity.runtime.RuntimeSingleton
类名称:RuntimeSingleton
方法名:getProperty
[英]Allows an external caller to get a property. The calling routine is required to know the type, as this routine will return an Object, as that is what properties can be.
[中]允许外部调用方获取属性。调用例程需要知道类型,因为该例程将返回一个对象,因为这就是属性可以是什么。
代码示例来源:origin: org.apache.velocity/velocity-engine-core
/**
* Get a Velocity Runtime property.
*
* @param key property to retrieve
* @return property value or null if the property
* not currently set
*/
public static Object getProperty( String key )
{
return RuntimeSingleton.getProperty( key );
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* Get a Velocity Runtime property.
*
* @param key property to retrieve
* @return property value or null if the property
* not currently set
*/
public static Object getProperty( String key )
{
return RuntimeSingleton.getProperty( key );
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* Allows an external caller to get a property. The calling
* routine is required to know the type, as this routine
* will return an Object, as that is what properties can be.
*
* @param key property to return
* @return The property value or null.
*/
public static Object getProperty( String key )
{
return RuntimeSingleton.getProperty( key );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Get a Velocity Runtime property.
*
* @param key property to retrieve
* @return property value or null if the property
* not currently set
*/
public static Object getProperty( String key )
{
return RuntimeSingleton.getProperty( key );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Allows an external caller to get a property. The calling
* routine is required to know the type, as this routine
* will return an Object, as that is what properties can be.
*
* @param key property to return
* @return The property value or null.
*/
public static Object getProperty( String key )
{
return RuntimeSingleton.getProperty( key );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Get a Velocity Runtime property.
*
* @param key property to retrieve
* @return property value or null if the property
* not currently set
*/
public static Object getProperty( String key )
{
return RuntimeSingleton.getProperty( key );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Allows an external caller to get a property. The calling
* routine is required to know the type, as this routine
* will return an Object, as that is what properties can be.
*
* @param key property to return
*/
public static Object getProperty( String key )
{
return RuntimeSingleton.getProperty( key );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Runs the test.
*/
public void runTest()
{
/*
* Assure we have the encoding we think we should.
*/
MockVelocityServlet servlet = new MockVelocityServlet();
try
{
servlet.init(new MockServletConfig());
}
catch (ServletException e)
{
e.printStackTrace();
}
System.out.println(RuntimeConstants.OUTPUT_ENCODING + "=" +
RuntimeSingleton.getProperty
(RuntimeConstants.OUTPUT_ENCODING));
HttpServletResponse res = new MockHttpServletResponse();
servlet.visibleSetContentType(null, res);
assertEquals("Character encoding not set to UTF-8",
"UTF-8", res.getCharacterEncoding());
}
内容来源于网络,如有侵权,请联系作者删除!