org.apache.velocity.tools.config
Class ToolConfiguration

java.lang.Object
  extended by org.apache.velocity.tools.config.Configuration
      extended by org.apache.velocity.tools.config.ToolConfiguration

public class ToolConfiguration
extends Configuration

Version:
$Id: ToolConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $
Author:
Nathan Bubna

Nested Class Summary
private static class ToolConfiguration.Status
           
 
Field Summary
private  java.lang.String classname
           
private  java.lang.String key
           
private  java.lang.Throwable problem
           
private  java.lang.String restrictTo
           
private  ToolConfiguration.Status status
           
 
Constructor Summary
ToolConfiguration()
           
 
Method Summary
 ToolInfo createInfo()
           
private  void digForDependencies(java.lang.Class clazz)
           
 java.lang.String getClassname()
           
private  java.lang.String getError(ToolConfiguration.Status status)
           
 java.lang.String[] getInvalidScopes()
           
 java.lang.String getKey()
          Returns the key set for this tool, if not null.
 java.lang.String getRestrictTo()
           
private  ToolConfiguration.Status getStatus()
           
 java.lang.Class getToolClass()
           
 java.lang.String[] getValidScopes()
           
 void setClass(java.lang.Class clazz)
          This doesn't take a Class parameter because this class was not created for all-java configuration.
 void setClassname(java.lang.String classname)
           
 void setKey(java.lang.String key)
           
 void setRestrictTo(java.lang.String path)
           
 java.lang.String toString()
           
 void validate()
           
 
Methods inherited from class org.apache.velocity.tools.config.Configuration
addConfiguration, addProperty, appendProperties, getConvertableProperties, getProperties, getSimpleProperties, hasProperties, removeProperty, removeProperty, setProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

private java.lang.String key

classname

private java.lang.String classname

restrictTo

private java.lang.String restrictTo

status

private ToolConfiguration.Status status

problem

private java.lang.Throwable problem
Constructor Detail

ToolConfiguration

public ToolConfiguration()
Method Detail

setKey

public void setKey(java.lang.String key)

setClass

public void setClass(java.lang.Class clazz)
This doesn't take a Class parameter because this class was not created for all-java configuration.


setClassname

public void setClassname(java.lang.String classname)

setRestrictTo

public void setRestrictTo(java.lang.String path)

getKey

public java.lang.String getKey()
Returns the key set for this tool, if not null. Otherwise, looks for a DefaultKey annotation on the tool class. Finally, if there is no default key, the Class.getSimpleName() is used as the key. This should only return null if there is no key and no classname set for this tool.


getClassname

public java.lang.String getClassname()

getToolClass

public java.lang.Class getToolClass()

getInvalidScopes

public java.lang.String[] getInvalidScopes()

getValidScopes

public java.lang.String[] getValidScopes()

getStatus

private final ToolConfiguration.Status getStatus()

digForDependencies

private void digForDependencies(java.lang.Class clazz)

getRestrictTo

public java.lang.String getRestrictTo()

createInfo

public ToolInfo createInfo()

getError

private final java.lang.String getError(ToolConfiguration.Status status)

validate

public void validate()
Overrides:
validate in class Configuration

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright (c) 2003-2007 Apache Software Foundation