org.clapper.util.scripting
Enum ScriptFrameworkType
java.lang.Object
java.lang.Enum<ScriptFrameworkType>
org.clapper.util.scripting.ScriptFrameworkType
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<ScriptFrameworkType>
public enum ScriptFrameworkType
- extends java.lang.Enum<ScriptFrameworkType>
Defines the set of script frameworks supported by the
UnifiedScriptEngineManager class. There are currently two legal
values:
- JAVAX_SCRIPT: use the javax.script (a.k.a.,
JSR 223) scripting infrastructure, available as of Java 6.
- BSF: Use the Apache Jakarta Bean Scripting Framework (BSF).
- Version:
- $Revision: 6434 $
- See Also:
UnifiedScriptEngineManager.getManager(ScriptFrameworkType),
UnifiedScriptEngineManager.getManager(ScriptFrameworkType[])
|
Method Summary |
static ScriptFrameworkType |
getTypeFromString(java.lang.String s)
Converts a string to a ScriptFrameworkType value, with the
following features:
Comparison is case-blind. |
static ScriptFrameworkType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static ScriptFrameworkType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
| Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
JAVAX_SCRIPT
public static final ScriptFrameworkType JAVAX_SCRIPT
BSF
public static final ScriptFrameworkType BSF
values
public static final ScriptFrameworkType[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for(ScriptFrameworkType c : ScriptFrameworkType.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static ScriptFrameworkType valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
getTypeFromString
public static final ScriptFrameworkType getTypeFromString(java.lang.String s)
- Converts a string to a ScriptFrameworkType value, with the
following features:
- Comparison is case-blind.
- Treats "." as "_" for the purposes of comparison. (That is,
"javax.script" and "javax_script" both match the value
JAVAX_SCRIPT.)
- Parameters:
s - the string to convert
- Returns:
- the corresponding value, or null if no match
Copyright © 2004-2007 Brian M. Clapper. All Rights Reserved.