Package org.jruby.embed
Enum Class AttributeName
- All Implemented Interfaces:
Serializable
,Comparable<AttributeName>
,Constable
Predefined keys for an attribute map that ScriptingContainer has.
Usage example:
ScriptingContainer container = new ScriptingContainer(); container.setAttribute(AttributeName.BASE_DIR, System.getProperty("user.dir");
- Author:
- Yoko Harada <[email protected]>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA key used in an attribute map to set a base directory.A key used in an attribute map to turn on/off clearing variables.A key used in an attribute map to set an error writer.A key used in an attribute map to set a line number in error message.A key used in an attribute map to set a reader.A key used in an attribute map to set a receiver object for sharing variables.A key used in an attribute map to turn on/off sharing variable feature.A key used in an attribute map to turn on/off termination.A key used in an attribute map to specify that the script to be parsed has unicode escape in it.A key used in an attribute map to set a writer. -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeName
Returns a fully qualified attribute name that corresponds to a given enumerated type identifier.toString()
Returns the fully qualified attribute name of this enum constant.static AttributeName
Returns the enum constant of this class with the specified name.static AttributeName[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READER
A key used in an attribute map to set a reader. This attribute can be set using a System property, org.jruby.embed.reader. -
WRITER
A key used in an attribute map to set a writer. This attribute can be set using a System property, org.jruby.embed.writer. -
ERROR_WRITER
A key used in an attribute map to set an error writer. This attribute can be set using a System property, org.jruby.embed.errorwriter. -
BASE_DIR
A key used in an attribute map to set a base directory. This attribute can be set using a System property, org.jruby.embed.basedir. -
LINENUMBER
A key used in an attribute map to set a line number in error message. This attribute is for JSR223 only. This attribute can be set using a System property, org.jruby.embed.linenumber. -
UNICODE_ESCAPE
A key used in an attribute map to specify that the script to be parsed has unicode escape in it. Default is false. This attribute can be set using a System property, org.jruby.embed.unicode.escpe. -
SHARING_VARIABLES
A key used in an attribute map to turn on/off sharing variable feature. Default is true. If false is set, sharing variables goes off, and better performance will be expected. This attribute can be set using a System property, org.jruby.embed.sharing.variables. -
CLEAR_VARAIBLES
A key used in an attribute map to turn on/off clearing variables. This attribute is for JSR223 only. Default is false, which means JRubyEngine doesn't clear an internal variable table, which ends up in being reused. If true is set, JRubyEngine clears the internal variable table. -
TERMINATION
A key used in an attribute map to turn on/off termination. This attribute is for JSR223 only. Default is false, which means JRubyEngine doesn't terminate any state and doesn't execute at_exit blocks. If true is set, JRubyEngine terminates the state as well as executes at_exit blocks. This attribute can be set using a System property, org.jruby.embed.termination. -
RECEIVER
A key used in an attribute map to set a receiver object for sharing variables. This attribute is for JSR223 only. This attribute can be set using a System property, org.jruby.embed.receiver.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
Returns the fully qualified attribute name of this enum constant.- Overrides:
toString
in classEnum<AttributeName>
- Returns:
- a fully qualified attribute name
-
getType
Returns a fully qualified attribute name that corresponds to a given enumerated type identifier.- Parameters:
fqpn
- fully qualified attribute name- Returns:
- a matched enumerated type identifier
-