public class Argv extends AbstractVariable
BiVariable.Type| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
VALID_NAME |
fromRuby, irubyObject, javaObject, javaType, name, receiver| Modifier | Constructor and Description |
|---|---|
(package private) |
Argv(RubyObject receiver,
java.lang.String name,
IRubyObject irubyObject)
A constructor used when ARGV is retrieved from Ruby.
|
private |
Argv(RubyObject receiver,
java.lang.String name,
java.lang.Object... javaObjects) |
| Modifier and Type | Method and Description |
|---|---|
static BiVariable |
getInstance(RubyObject receiver,
java.lang.String name,
java.lang.Object... javaObject)
Returns an instance of this class.
|
java.lang.Object |
getJavaObject()
Returns a value of the variable this object holds in Java type.
|
BiVariable.Type |
getType()
Returns enum type of this variable defined in
BiVariable. |
void |
inject()
Injects ARGV values to a parsed Ruby script.
|
static boolean |
isValidName(java.lang.Object name)
Returns true if the given name is ARGV.
|
void |
remove()
Removes this object from
BiVariableMap. |
static void |
retrieve(RubyObject receiver,
BiVariableMap vars)
Retrieves ARGV from Ruby after the evaluation or method invocation.
|
static void |
retrieveByKey(RubyObject receiver,
BiVariableMap vars,
java.lang.String key)
Retrieves ARGV by key from Ruby runtime after the evaluation.
|
private static void |
updateARGV(IRubyObject receiver,
BiVariableMap vars) |
getCurrentContext, getName, getReceiver, getRubyClass, getRubyObject, getRuntime, getTopSelf, getTopSelf, isReceiverIdentical, isValidName, setJavaObject, setRubyObject, updateByJavaObject, updateRubyObjectprivate static final java.lang.String VALID_NAME
private Argv(RubyObject receiver, java.lang.String name, java.lang.Object... javaObjects)
Argv(RubyObject receiver, java.lang.String name, IRubyObject irubyObject)
receiver - a receiver object that this variable/constant is originally in. When
the variable/constant is originated from Ruby, receiver may not be null.name - the constant nameirubyObject - Ruby constant objectpublic static BiVariable getInstance(RubyObject receiver, java.lang.String name, java.lang.Object... javaObject)
BiVariableMap.runtime - name - a variable namejavaObject - Java object that should be assigned to.public BiVariable.Type getType()
BiVariable.public static boolean isValidName(java.lang.Object name)
name - is a name to be checked.public void inject()
runtime - is environment where a variable injection occursreceiver - is the instance that will have variable injection.public void remove()
BiVariableMap. Also, initialize
this variable in top self.public static void retrieve(RubyObject receiver, BiVariableMap vars)
runtime - Ruby runtimereceiver - receiver object returned when a script is evaluated.vars - map to save retrieved constants.private static void updateARGV(IRubyObject receiver, BiVariableMap vars)
public static void retrieveByKey(RubyObject receiver, BiVariableMap vars, java.lang.String key)
receiver - receiver object returned when a script is evaluated.vars - map to save retrieved instance variables.key - instace varible namepublic java.lang.Object getJavaObject()
BiVariablegetJavaObject in interface BiVariablegetJavaObject in class AbstractVariable