Skip to content

Commit

Permalink
Update API document and correct typos
Browse files Browse the repository at this point in the history
  • Loading branch information
yokolet committed Jan 13, 2010
1 parent ea32b31 commit 2555b05
Show file tree
Hide file tree
Showing 31 changed files with 73 additions and 64 deletions.
10 changes: 5 additions & 5 deletions src/org/jruby/embed/AttributeName.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,27 @@ public enum AttributeName {
/**
* Creates an AttributeName Enum type instance.
*
* @param fqan a fully qualified attriute name
* @param fqan a fully qualified attribute name
*/
AttributeName(String fqpn) {
this.fqpn = fqpn;
}

/**
* Returns the fully qualified attriute name of this enum constant.
* Returns the fully qualified attribute name of this enum constant.
*
* @return a fully qualified attriute name
* @return a fully qualified attribute name
*/
@Override
public String toString() {
return fqpn;
}

/**
* Returns a fully qualified attriute name that corresponds to a given
* Returns a fully qualified attribute name that corresponds to a given
* enumerated type identifier.
*
* @param fqan fully qualified attriute name
* @param fqan fully qualified attribute name
* @return a matched enumerated type identifier
*/
public static AttributeName getType(String fqpn) {
Expand Down
16 changes: 8 additions & 8 deletions src/org/jruby/embed/EmbedRubyInstanceConfigAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009, 2010 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down Expand Up @@ -151,14 +151,14 @@ public interface EmbedRubyInstanceConfigAdapter {
public void setCompileMode(CompileMode mode);

/**
* Tests whether Ruby runs in a proces or not.
* Tests whether Ruby runs in a process or not.
*
* @return true if Ruby is configured to run in a process, othereise, false.
* @return true if Ruby is configured to run in a process, otherwise, false.
*/
public boolean isRunRubyInProcess();

/**
* Chnages the value to determine whether Ruby runs in a process or not. The
* Changes the value to determine whether Ruby runs in a process or not. The
* default value is true.
*
* @param inprocess true when Ruby is set to run in the process, or false not to
Expand Down Expand Up @@ -236,7 +236,7 @@ public interface EmbedRubyInstanceConfigAdapter {
/**
* Returns a JRuby home directory.
*
* The default JRuby home is the value of JRUBY_HOME environmnet variable,
* The default JRuby home is the value of JRUBY_HOME environmet variable,
* or "jruby.home" system property when no security restriction is set to
* those directories. If none of JRUBY_HOME or jruby.home is set and jruby-complete.jar
* is used, the default JRuby home is "/META-INF/jruby.home" in the jar archive.
Expand Down Expand Up @@ -382,7 +382,7 @@ public interface EmbedRubyInstanceConfigAdapter {
public String getRecordSeparator();

/**
* Changes a record separator to a given value. If "0" is given, the recoed
* Changes a record separator to a given value. If "0" is given, the record
* separator goes to "\n\n", "777" goes to "\uFFFF", otherwise, an octal value
* of the given number.
*
Expand All @@ -391,7 +391,7 @@ public interface EmbedRubyInstanceConfigAdapter {
public void setRecordSeparator(String separator);

/**
* Returns a value of KCode currenty used. The default value is KCode.NONE.
* Returns a value of KCode currently used. The default value is KCode.NONE.
*
* @return a KCode value.
*/
Expand Down Expand Up @@ -441,7 +441,7 @@ public interface EmbedRubyInstanceConfigAdapter {
public void setJitThreshold(int threshold);

/**
* Returns a value of a max class cahce size. The default value is 0 when
* Returns a value of a max class cache size. The default value is 0 when
* security restriction is applied, or 4096 when no security restriction exists.
*
* @return a value of a max class cache size.
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/EmbedRubyInterfaceAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface EmbedRubyInterfaceAdapter {
/**
* Returns a instance of requested interface type from a previously evaluated script.
*
* @param receiver a reveiver of the previously evaluated script.
* @param receiver a receiver of the previously evaluated script.
* @param clazz an interface type of the returning instance.
* @return an instance of requested interface type.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/org/jruby/embed/EmbedRubyObjectAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/**
* Wrapper interface of RubyObjectAdapter for embedding. Methods' arguments can have
* simple Java objects for easiness. Each methods converts returned object
* to a Java type specifed in the argumnet.
* to a Java type specified in the argument.
*
* @author Yoko Harada <yokolet@gmail.com>
*/
Expand Down Expand Up @@ -129,7 +129,7 @@ public interface EmbedRubyObjectAdapter extends RubyObjectAdapter {
* variables' values from Java.
*
* @param receiver is an instance that will receive this method call
* @param methodName is a method name to be calleid
* @param methodName is a method name to be called
* @param args is an array of method arguments
* @param returnType is the type we want it to convert to
* @param unit is parsed unit
Expand All @@ -143,7 +143,7 @@ public interface EmbedRubyObjectAdapter extends RubyObjectAdapter {
* inject Ruby's local variables' values from Java.
*
* @param receiver is an instance that will receive this method call
* @param methodName is a method name to be calleid
* @param methodName is a method name to be called
* @param args is an array of method arguments except a block
* @param block is a block to be executed in this method
* @param returnType is the type we want it to convert to
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/EvalFailedException.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.jruby.exceptions.RaiseException;

/**
* This class is a generaic uncehcked exception raised during evaluating.
* This class is a generic unchecked exception raised during evaluating.
*
* @author Yoko Harada <yokolet@gmail.com>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/InvokeFailedException.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
package org.jruby.embed;

/**
* This class is a generaic uncehcked exception raised during calling methods and
* This class is a generic unchecked exception raised during calling methods and
* invoking interface methods which are implemented by Ruby scripts.
*
* @author Yoko Harada <yokolet@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/LocalContextScope.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public enum LocalContextScope {
SINGLETHREAD,

/**
* Specifes that an instance of {@link org.jruby.embed.internal.LocalContext} is a thread local.
* Specified that an instance of {@link org.jruby.embed.internal.LocalContext} is a thread local.
*/
THREADSAFE
}
2 changes: 1 addition & 1 deletion src/org/jruby/embed/LocalVariableBehavior.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public enum LocalVariableBehavior {
PERSISTENT,

/**
* Specifies that Ruby's local variables have faithful behaivor to its semantics.
* Specifies that Ruby's local variables have faithful behavior to its semantics.
* Local variables do not survive over an evaluation. All local variables
* will vanish after every evaluation.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/ParseFailedException.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
package org.jruby.embed;

/**
* This class is a generaic uncehcked exception raised during parsing.
* This class is a generic unchecked exception raised during parsing.
* Checked exceptions, for example, java.io.FileNotFoundException, are also wrapped
* by this exception.
*
Expand Down
4 changes: 2 additions & 2 deletions src/org/jruby/embed/PropertyName.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public enum PropertyName {
LOCALVARIABLE_BEHAVIOR("org.jruby.embed.localvariable.behavior"),

/**
* A key to get/set compile mode. The assigend value is one of jit or force.
* A key to get/set compile mode. The assigned value is one of jit or force.
*/
COMPILEMODE("org.jruby.embed.compilemode"),

/**
* A key to get/set compatible version to Ruby. If the assigend value matches
* A key to get/set compatible version to Ruby. If the assigned value matches
* "[jJ]?(r|R)(u|U)(b|B)(y|Y)1[\\._]?9", then Ruby 1.9 will be chosen.
*/
COMPATVERSION("org.jruby.embed.compat.version");
Expand Down
15 changes: 12 additions & 3 deletions src/org/jruby/embed/ScriptingContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down Expand Up @@ -658,8 +658,11 @@ public void setClassLoader(ClassLoader loader) {
}

/**
* Returns a profiler currently used. The default profiler is Profile.DEFAULT,
* Returns a Profile currently used. The default value is Profile.DEFAULT,
* which has the same behavior to Profile.ALL.
* Profile allows you to define a restricted subset of code to be loaded during
* the runtime initialization. When you use JRuby in restricted environment
* such as Google App Engine, Profile is a helpful option.
*
* @since JRuby 1.5.0.
*
Expand All @@ -670,10 +673,16 @@ public Profile getProfile() {
}

/**
* Changes a profiler to a given one.
* Changes a Profile to a given one. The default value is Profile.DEFAULT,
* which has the same behavior to Profile.ALL.
* Call this before you use put/get, runScriptlet, and parse methods so that
* initial configurations will work.
*
* Profile allows you to define a restricted subset of code to be loaded during
* the runtime initialization. When you use JRuby in restricted environment
* such as Google App Engine, Profile is a helpful option. For example,
* Profile.NO_FILE_CLASS doesn't load File class.
*
* @since JRuby 1.5.0.
*
* @param profile a new profiler to be set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down
12 changes: 6 additions & 6 deletions src/org/jruby/embed/internal/BiVariableMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down Expand Up @@ -72,7 +72,7 @@ public class BiVariableMap<K, V> implements Map<K, V> {
private VariableInterceptor interceptor;

/**
* Constructs an empy map. Users do not instantiate this map. The map is created
* Constructs an empty map. Users do not instantiate this map. The map is created
* internally.
*
* @param runtime is environment where variables are used to execute Ruby scripts.
Expand All @@ -83,7 +83,7 @@ public BiVariableMap(Ruby runtime) {


/**
* Constructs an empy map. Users do not instantiate this map. The map is created
* Constructs an empty map. Users do not instantiate this map. The map is created
* internally.
*
* @param runtime is environment where variables are used to execute Ruby scripts.
Expand Down Expand Up @@ -170,7 +170,7 @@ private void checkKey(Object key) {
* Returns <tt>true</tt> if this map contains a mapping for the specified
* key.
*
* @param key is a key to be tested its presense
* @param key is a key to be tested its presence
* @return <tt>true</tt> if this map contains a mapping for the specified key
*/
public boolean containsKey(Object key) {
Expand All @@ -182,7 +182,7 @@ public boolean containsKey(Object key) {
* Returns <tt>true</tt> if this map maps one or more keys to the
* specified value.
*
* @param value is a Java object to be tested it presense
* @param value is a Java object to be tested it presence
* @return Returns <tt>true</tt> if this map maps one or more keys to the
* specified value.
*/
Expand Down Expand Up @@ -274,7 +274,7 @@ public V put (K key, V value) {

/**
* Returns Ruby's local variable names this map has. The returned array is mainly
* used to inject local variables to Ruby scripts while parseing.
* used to inject local variables to Ruby scripts while parsing.
*
* @return String array of Ruby's local variable names
*/
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/internal/EmbedEvalUnitImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import org.jruby.runtime.scope.ManyVarsDynamicScope;

/**
* Implementation of org.jruby.javasupport.JavaEmbedUtils.EvalUnit for Embeddiing.
* Implementation of org.jruby.javasupport.JavaEmbedUtils.EvalUnit for embeddiing.
* This class is created when a Ruby script has been parsed. Once parsed, the script
* is ready to run many times without parsing.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public EmbedRubyInterfaceAdapterImpl(ScriptingContainer container) {
/**
* Returns a instance of a requested interface type from a previously evaluated script.
*
* @param receiver a reveiver of the previously evaluated script.
* @param receiver a receiver of the previously evaluated script.
* @param clazz an interface type of the returning instance.
* @return an instance of requested interface type.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/org/jruby/embed/internal/LocalContextProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand All @@ -37,7 +37,7 @@

/**
* LocalContextProvider provides an instance of {@link org.jruby.embed.internal.LocalContext} from
* a specifed scope defined by {@link LocalContextScope}. Users can configure
* a specified scope defined by {@link LocalContextScope}. Users can configure
* Ruby runtime by using methods of this interface before Ruby runtime is used.
* Default scope is LocalContextScope.THREADSAFE.
*
Expand Down Expand Up @@ -82,7 +82,7 @@ public interface LocalContextProvider {
Ruby getRuntime();

/**
* Returns a {@link BiVariableMap} of a specifed scope.
* Returns a {@link BiVariableMap} of a specified scope.
*
* @return a variable map
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/jsr223/JRubyCompiledScript.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/jsr223/JRubyEngineFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* Copyright (C) 2009 Yoko Harada <yokolet@gmail.com>
* Copyright (C) 2009-2010 Yoko Harada <yokolet@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down
2 changes: 1 addition & 1 deletion src/org/jruby/embed/variable/AbstractVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Object getJavaObject() {
}
Ruby rt = irubyObject.getRuntime();
if (javaType != null) {
// Java originated varibales
// Java originated variables
javaObject = javaType.cast(JavaEmbedUtils.rubyToJava(rt, irubyObject, javaType));
} else {
// Ruby originated variables
Expand Down
Loading

0 comments on commit 2555b05

Please sign in to comment.