类 DataInfo

java.lang.Object
org.apache.velocity.tools.view.DataInfo
所有已实现的接口:
ToolInfo

@Deprecated public class DataInfo extends Object implements ToolInfo
已过时。
Use Data

ToolInfo implementation to handle "primitive" data types. It currently supports String, Number, and Boolean data.

An example of data elements specified in your toolbox.xml might be:

  <data type="string">
    <key>app_name</key>
    <value>FooWeb Deluxe</value>
  </data>
  <data type="number">
    <key>app_version</key>
    <value>4.2</value>
  </data>
  <data type="boolean">
    <key>debug</key>
    <value>true</value>
  </data>
  <data type="number">
    <key>screen_width</key>
    <value>400</value>
  </data>
 

版本:
$Id: DataInfo.java 651469 2008-04-25 00:46:13Z nbubna $
作者:
Nathan Bubna
  • 字段详细资料

    • TYPE_STRING

      public static final String TYPE_STRING
      已过时。
      另请参阅:
    • TYPE_NUMBER

      public static final String TYPE_NUMBER
      已过时。
      另请参阅:
    • TYPE_BOOLEAN

      public static final String TYPE_BOOLEAN
      已过时。
      另请参阅:
    • TYPE_ID_STRING

      private static final int TYPE_ID_STRING
      已过时。
      另请参阅:
    • TYPE_ID_NUMBER

      private static final int TYPE_ID_NUMBER
      已过时。
      另请参阅:
    • TYPE_ID_BOOLEAN

      private static final int TYPE_ID_BOOLEAN
      已过时。
      另请参阅:
    • key

      private String key
      已过时。
    • type_id

      private int type_id
      已过时。
    • data

      private Object data
      已过时。
  • 构造器详细资料

    • DataInfo

      public DataInfo()
      已过时。
  • 方法详细资料

    • setKey

      public void setKey(String key)
      已过时。
      Mutators
    • setType

      public void setType(String type)
      已过时。
    • setValue

      public void setValue(String value)
      已过时。
    • getKey

      public String getKey()
      已过时。
      Accessors
      指定者:
      getKey 在接口中 ToolInfo
      返回:
      the context key for the tool
    • getClassname

      public String getClassname()
      已过时。
      指定者:
      getClassname 在接口中 ToolInfo
      返回:
      the fully qualified classname for the tool
    • getInstance

      public Object getInstance(Object initData)
      已过时。
      Returns the data. Always returns the same object since the data is a constant. Initialization data is ignored.
      指定者:
      getInstance 在接口中 ToolInfo
      参数:
      initData - an object that may be used to initialize the instance
      返回:
      an instance of the tool