當前位置: 首頁>>代碼示例>>Java>>正文


Java VariableInfo類代碼示例

本文整理匯總了Java中javax.servlet.jsp.tagext.VariableInfo的典型用法代碼示例。如果您正苦於以下問題:Java VariableInfo類的具體用法?Java VariableInfo怎麽用?Java VariableInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


VariableInfo類屬於javax.servlet.jsp.tagext包,在下文中一共展示了VariableInfo類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getScriptingVars

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
public List<Object> getScriptingVars(int scope) {
    List<Object> vec = null;

    switch (scope) {
    case VariableInfo.AT_BEGIN:
        vec = this.atBeginScriptingVars;
        break;
    case VariableInfo.AT_END:
        vec = this.atEndScriptingVars;
        break;
    case VariableInfo.NESTED:
        vec = this.nestedScriptingVars;
        break;
    }

    return vec;
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:18,代碼來源:Node.java

示例2: getScriptingVars

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
public Vector getScriptingVars(int scope) {
    Vector vec = null;

    switch (scope) {
    case VariableInfo.AT_BEGIN:
        vec = this.atBeginScriptingVars;
        break;
    case VariableInfo.AT_END:
        vec = this.atEndScriptingVars;
        break;
    case VariableInfo.NESTED:
        vec = this.nestedScriptingVars;
        break;
    }

    return vec;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:18,代碼來源:Node.java

示例3: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
  // get the type
  String type = (String)data.getAttribute("type");

  // make it an object if none supplied
  if (type == null) {
    type = "java.lang.Object";
  }

  // return the infor about the deined object
  VariableInfo[] vinfo = new VariableInfo[1];
  vinfo[0] = new VariableInfo(data.getAttributeString("id"),
                              type, true, VariableInfo.AT_END );

  /* return the results */
  return vinfo;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:21,代碼來源:NestedDefineTei.java

示例4: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {

    String type = (String)data.getAttribute("type");
    Object name = data.getAttribute("name");
    Object value = data.getAttribute("value");
    if (type == null) {
        if ( (value!=null) ||  (name==null) )
            type = "java.lang.String";
        else 
            type = "java.lang.Object";
    }

    return new VariableInfo[] {
      new VariableInfo(data.getAttributeString("id"),
                       type,
                       true,
                       VariableInfo.AT_END )
    };

}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:24,代碼來源:DefineTei.java

示例5: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String type = null;
       String property = data.getAttributeString("property");
       if ("application".equalsIgnoreCase(property))
           type = "javax.servlet.ServletContext";
       else if ("config".equalsIgnoreCase(property))
           type = "javax.servlet.ServletConfig";
       else if ("request".equalsIgnoreCase(property))
           type = "javax.servlet.ServletRequest";
       else if ("response".equalsIgnoreCase(property))
           type = "javax.servlet.ServletResponse";
       else if ("session".equalsIgnoreCase(property))
           type = "javax.servlet.http.HttpSession";
       else
           type = "java.lang.Object";

return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                   type,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:29,代碼來源:PageTei.java

示例6: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String className = null;
       if (data.getAttribute("multiple") == null)
           className = "java.lang.String";
       else
           className = "java.lang.String[]";
return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                          className,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:19,代碼來源:HeaderTei.java

示例7: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String type = null;
       if (data.getAttribute("input") == null)
           type = "java.lang.String";
       else
           type = "java.io.InputStream";
return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                   type,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:19,代碼來源:ResourceTei.java

示例8: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String className = null;
       if (data.getAttribute("multiple") == null)
           className = "javax.servlet.http.Cookie";
       else
           className = "javax.servlet.http.Cookie[]";
return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                   className,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:19,代碼來源:CookieTei.java

示例9: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
    * Return information about the scripting variables to be created.
    */
   public VariableInfo[] getVariableInfo(TagData data) {

       String type = null;
       if (data.getAttribute("formBean") != null)
           type = "org.apache.struts.action.ActionFormBean";
       else if (data.getAttribute("forward") != null)
           type = "org.apache.struts.action.ActionForward";
       else if (data.getAttribute("mapping") != null)
           type = "org.apache.struts.action.ActionMapping";
       else
           type = "java.lang.Object";

return new VariableInfo[] {
  new VariableInfo(data.getAttributeString("id"),
                   type,
                   true,
                   VariableInfo.AT_BEGIN)
};

   }
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:24,代碼來源:StrutsTei.java

示例10: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
   * Return information about the scripting variables to be created.
   */
  public VariableInfo[] getVariableInfo(TagData data) {

    String classname = data.getAttributeString("classname");
    if( classname == null )
      classname = "java.lang.Object";
    String id = data.getAttributeString("id");
    if( id == null )
      id = data.getAttributeString("name");

    return new VariableInfo[] {
    new VariableInfo(id,
                     classname,
                     true,
                     VariableInfo.AT_END)
};

  }
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:21,代碼來源:UseAttributeTei.java

示例11: getScriptingVars

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
public List<Object> getScriptingVars(int scope) {
	List<Object> vec = null;

	switch (scope) {
	case VariableInfo.AT_BEGIN:
		vec = this.atBeginScriptingVars;
		break;
	case VariableInfo.AT_END:
		vec = this.atEndScriptingVars;
		break;
	case VariableInfo.NESTED:
		vec = this.nestedScriptingVars;
		break;
	}

	return vec;
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:18,代碼來源:Node.java

示例12: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/** Returns an array of length two, for the variables exposed. */
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    VariableInfo[]  scriptVars = new VariableInfo[2];

    scriptVars[0] = new VariableInfo("index",
                                     "java.lang.Number",
                                     true,
                                     VariableInfo.NESTED);

    // TODO: ValidationError should expose properties like field name
    scriptVars[1] = new VariableInfo("error",
                                     ValidationError.class.getName(),
                                     true,
                                     VariableInfo.NESTED);

    return scriptVars;
}
 
開發者ID:nkasvosve,項目名稱:beyondj,代碼行數:19,代碼來源:ErrorsTagExtraInfo.java

示例13: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
 * Attempts to return type information so that the container can create a
 * named variable for the action bean.
 */
@Override public VariableInfo[] getVariableInfo(final TagData tag) {
    // We can only provide the type of 'var' if beanclass was used because
    // if binding was used we need runtime information!
    Object beanclass = tag.getAttribute("beanclass");

    // Turns out beanclass="${...}" does NOT return TagData.REQUEST_TIME_VALUE; only beanclass="<%= ... %>".
    if (beanclass != null && !beanclass.equals(TagData.REQUEST_TIME_VALUE)) {
        String var = tag.getAttributeString("var");
        if (var == null) var = tag.getAttributeString("id");

        // Make sure we have the class name, not the class
        if (beanclass instanceof Class<?>) beanclass = ((Class<?>) beanclass).getName();

        // Return the variable info
        if (beanclass instanceof String) {
            String string = (String) beanclass;
            if (!string.startsWith("${")) {
                return new VariableInfo[] { new VariableInfo(var, string, true, VariableInfo.AT_BEGIN) };
            }
        }
    }
    return NO_INFO;
}
 
開發者ID:nkasvosve,項目名稱:beyondj,代碼行數:28,代碼來源:UseActionBeanTagExtraInfo.java

示例14: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
    /* the id parameter */
    String id = data.getAttributeString("id");

    VariableInfo[] vi = null;

    if (id != null) {
        vi = new VariableInfo[1];
        vi[0] =
            new VariableInfo(id, "java.lang.String", true,
                VariableInfo.AT_END);
    } else {
        vi = new VariableInfo[0];
    }

    // job done
    return vi;
}
 
開發者ID:SonarSource,項目名稱:sonar-scanner-maven,代碼行數:22,代碼來源:NestedWriteNestingTei.java

示例15: getVariableInfo

import javax.servlet.jsp.tagext.VariableInfo; //導入依賴的package包/類
/**
 * Return information about the scripting variables to be created.
 */
public VariableInfo[] getVariableInfo(TagData data) {
    // get the type
    String type = (String) data.getAttribute("type");

    // make it an object if none supplied
    if (type == null) {
        type = "java.lang.Object";
    }

    // return the infor about the deined object
    VariableInfo[] vinfo = new VariableInfo[1];

    vinfo[0] =
        new VariableInfo(data.getAttributeString("id"), type, true,
            VariableInfo.AT_END);

    /* return the results */
    return vinfo;
}
 
開發者ID:SonarSource,項目名稱:sonar-scanner-maven,代碼行數:23,代碼來源:NestedDefineTei.java


注:本文中的javax.servlet.jsp.tagext.VariableInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。