本文整理了Java中org.apache.velocity.runtime.RuntimeSingleton.getLoaderNameForResource
方法的一些代码示例,展示了RuntimeSingleton.getLoaderNameForResource
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RuntimeSingleton.getLoaderNameForResource
方法的具体详情如下:
包路径:org.apache.velocity.runtime.RuntimeSingleton
类名称:RuntimeSingleton
方法名:getLoaderNameForResource
[英]Determines is a template exists, and returns name of the loader that provides it. This is a slightly less hokey way to support the Velocity.templateExists() utility method, which was broken when per-template encoding was introduced. We can revisit this.
[中]确定模板是否存在,并返回提供该模板的加载程序的名称。这是一种支持速度的稍微不那么矫揉造作的方式。templateExists()实用程序方法,当引入每模板编码时,该方法被破坏。我们可以重温一下。
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* Determines is a template exists, and returns name of the loader that
* provides it. This is a slightly less hokey way to support
* the Velocity.templateExists() utility method, which was broken
* when per-template encoding was introduced. We can revisit this.
*
* @param resourceName Name of template or content resource
* @return class name of loader than can provide it
*/
public static String getLoaderNameForResource( String resourceName )
{
return RuntimeSingleton.getLoaderNameForResource( resourceName );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Determines is a template exists, and returns name of the loader that
* provides it. This is a slightly less hokey way to support
* the Velocity.templateExists() utility method, which was broken
* when per-template encoding was introduced. We can revisit this.
*
* @param resourceName Name of template or content resource
* @return class name of loader than can provide it
*/
public static String getLoaderNameForResource( String resourceName )
{
return RuntimeSingleton.getLoaderNameForResource( resourceName );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Determines is a template exists, and returns name of the loader that
* provides it. This is a slightly less hokey way to support
* the Velocity.templateExists() utility method, which was broken
* when per-template encoding was introduced. We can revisit this.
*
* @param resourceName Name of template or content resource
* @return class name of loader than can provide it
*/
public static String getLoaderNameForResource( String resourceName )
{
return RuntimeSingleton.getLoaderNameForResource( resourceName );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* <p>Determines whether a resource is accessable via the
* currently configured resource loaders. {@link
* org.apache.velocity.runtime.resource.Resource} is the generic
* description of templates, static content, etc.</p>
*
* <p>Note that the current implementation will <b>not</b> change
* the state of the system in any real way - so this cannot be
* used to pre-load the resource cache, as the previous
* implementation did as a side-effect.</p>
*
* @param resourceName The name of the resource to search for.
* @return Whether the resource was located.
*/
public static boolean resourceExists(String resourceName)
{
return (RuntimeSingleton.getLoaderNameForResource(resourceName) != null);
}
代码示例来源:origin: velocity/velocity-dep
/**
* <p>Determines whether a resource is accessable via the
* currently configured resource loaders. {@link
* org.apache.velocity.runtime.resource.Resource} is the generic
* description of templates, static content, etc.</p>
*
* <p>Note that the current implementation will <b>not</b> change
* the state of the system in any real way - so this cannot be
* used to pre-load the resource cache, as the previous
* implementation did as a side-effect.</p>
*
* @param resourceName The name of the resource to search for.
* @return Whether the resource was located.
*/
public static boolean resourceExists(String resourceName)
{
return (RuntimeSingleton.getLoaderNameForResource(resourceName) != null);
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* <p>Determines whether a resource is accessable via the
* currently configured resource loaders. {@link
* org.apache.velocity.runtime.resource.Resource} is the generic
* description of templates, static content, etc.</p>
*
* <p>Note that the current implementation will <b>not</b> change
* the state of the system in any real way - so this cannot be
* used to pre-load the resource cache, as the previous
* implementation did as a side-effect.</p>
*
* @param resourceName The name of the resource to search for.
* @return Whether the resource was located.
*/
public static boolean resourceExists(String resourceName)
{
return (RuntimeSingleton.getLoaderNameForResource(resourceName) != null);
}
代码示例来源:origin: org.apache.velocity/velocity-engine-core
/**
* <p>Determines whether a resource is accessible via the
* currently configured resource loaders. {@link
* org.apache.velocity.runtime.resource.Resource} is the generic
* description of templates, static content, etc.</p>
*
* <p>Note that the current implementation will <b>not</b> change
* the state of the system in any real way - so this cannot be
* used to pre-load the resource cache, as the previous
* implementation did as a side-effect.</p>
*
* @param resourceName The name of the resource to search for.
* @return Whether the resource was located.
*/
public static boolean resourceExists(String resourceName)
{
return (RuntimeSingleton.getLoaderNameForResource(resourceName) != null);
}
内容来源于网络,如有侵权,请联系作者删除!