本文整理了Java中org.apache.velocity.context.Context.remove()
方法的一些代码示例,展示了Context.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.remove()
方法的具体详情如下:
包路径:org.apache.velocity.context.Context
类名称:Context
方法名:remove
[英]Removes the value associated with the specified key from the context.
[中]从上下文中删除与指定键关联的值。
代码示例来源:origin: webx/citrus
@Override
public Object internalRemove(Object key) {
return context.remove(key);
}
代码示例来源:origin: webx/citrus
@Override
public Object internalRemove(Object key) {
return context.remove(key);
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* @see org.apache.velocity.context.Context#remove(java.lang.Object)
*/
public Object remove(Object key)
{
return context.remove( key );
}
代码示例来源:origin: stackoverflow.com
@ScheduledMethod(start = 10, pick = 1, interval = 1)
public void die() {
Context context = ContextUtils.getContext(this);
context.remove(this);
((DefaultGeography) geography).remove(this);
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* @see org.apache.velocity.context.Context#remove(java.lang.Object)
*/
public Object remove(Object key)
{
return localContext.remove( key );
}
代码示例来源:origin: org.apache.velocity/velocity-engine-core
/**
* @see org.apache.velocity.context.Context#remove(java.lang.Object)
*/
public Object remove(String key)
{
return context.remove( key );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* @see org.apache.velocity.context.Context#remove(java.lang.Object)
*/
public Object remove(Object key)
{
return context.remove( key );
}
代码示例来源:origin: velocity/velocity-dep
public Object remove(Object key)
{
return context.remove( key );
}
代码示例来源:origin: com.alibaba.citrus/citrus-webx-all
@Override
public Object internalRemove(Object key) {
return context.remove(key);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* @see org.apache.velocity.context.Context#remove(java.lang.Object)
*/
public Object remove(Object key)
{
if (localContext != null)
{
return localContext.remove(key);
}
return super.remove(key);
}
代码示例来源:origin: org.sonatype.maven.archetype/archetype-common
private void restoreParentArtifactId(Context context, String parentArtifactId) {
if (StringUtils.isEmpty(parentArtifactId)) {
context.remove(Constants.PARENT_ARTIFACT_ID);
}
else {
context.put(Constants.PARENT_ARTIFACT_ID, parentArtifactId);
}
}
代码示例来源:origin: apache/maven-archetype
private void restoreParentArtifactId( Context context, String parentArtifactId )
{
if ( StringUtils.isEmpty( parentArtifactId ) )
{
context.remove( Constants.PARENT_ARTIFACT_ID );
}
else
{
context.put( Constants.PARENT_ARTIFACT_ID, parentArtifactId );
}
}
代码示例来源:origin: fex-team/fis-velocity-tools
/**
* @see org.apache.velocity.context.Context#remove(java.lang.Object)
*/
public Object remove(Object key)
{
if (localContext != null)
{
return localContext.remove(key);
}
return super.remove(key);
}
代码示例来源:origin: org.apache.velocity.tools/velocity-tools-view-jsp
@Override
public void removeAttribute(String name) {
if (name == null) {
throw new NullPointerException("The attribute name is null");
}
velocityContext.remove(name);
request.removeAttribute(name);
HttpSession session = request.getSession(false);
if (session != null) {
session.removeAttribute(name);
}
viewContext.getServletContext().removeAttribute(name);
}
代码示例来源:origin: org.apache.velocity.tools/velocity-tools-view-jsp
@Override
public void removeAttribute(String name, int scope) {
if (name == null) {
throw new NullPointerException("The attribute name is null");
}
switch (scope)
{
case PAGE_SCOPE:
velocityContext.remove(name);
break;
case REQUEST_SCOPE:
request.removeAttribute(name);
break;
case SESSION_SCOPE:
HttpSession session = request.getSession(false);
if (session != null) {
session.removeAttribute(name);
}
break;
case APPLICATION_SCOPE:
viewContext.getServletContext().removeAttribute(name);
break;
default:
throw new IllegalArgumentException("Invalid scope constant value: " + scope);
}
}
代码示例来源:origin: velocity/velocity-dep
context.remove(counterName);
context.remove(elementKey);
内容来源于网络,如有侵权,请联系作者删除!