Permalink
Browse files

Annotate the rest of the Java classes with names, parents and inclusi…

…ons. Also add a warning to install_doc.

git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@6291 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information...
1 parent 36f396b commit 424a1cbff5aea37f2f92cc208d29d2544f092828 @olabini olabini committed Mar 19, 2008
Showing with 269 additions and 92 deletions.
  1. +3 −0 bin/install_doc
  2. +2 −0 src/org/jruby/RubyMethod.java
  3. +2 −0 src/org/jruby/RubyNKF.java
  4. +2 −0 src/org/jruby/RubyNameError.java
  5. +2 −0 src/org/jruby/RubyNil.java
  6. +2 −0 src/org/jruby/RubyNoMethodError.java
  7. +2 −0 src/org/jruby/RubyNumeric.java
  8. +2 −0 src/org/jruby/RubyObjectSpace.java
  9. +2 −0 src/org/jruby/RubyPrecision.java
  10. +2 −0 src/org/jruby/RubyProc.java
  11. +10 −2 src/org/jruby/RubyProcess.java
  12. +2 −0 src/org/jruby/RubyRange.java
  13. +2 −0 src/org/jruby/RubyRegexp.java
  14. +2 −0 src/org/jruby/RubySignal.java
  15. +2 −0 src/org/jruby/RubyString.java
  16. +2 −0 src/org/jruby/RubyStringIO.java
  17. +2 −0 src/org/jruby/RubyStringScanner.java
  18. +2 −0 src/org/jruby/RubyStruct.java
  19. +2 −0 src/org/jruby/RubySymbol.java
  20. +2 −0 src/org/jruby/RubySystemCallError.java
  21. +92 −90 src/org/jruby/RubySystemExit.java
  22. +2 −0 src/org/jruby/RubyThread.java
  23. +2 −0 src/org/jruby/RubyThreadGroup.java
  24. +2 −0 src/org/jruby/RubyTime.java
  25. +2 −0 src/org/jruby/RubyUnboundMethod.java
  26. +19 −0 src/org/jruby/RubyYAML.java
  27. +37 −0 src/org/jruby/RubyZlib.java
  28. +2 −0 src/org/jruby/ext/Generator.java
  29. +2 −0 src/org/jruby/ext/Readline.java
  30. +5 −0 src/org/jruby/ext/WeakRef.java
  31. +2 −0 src/org/jruby/ext/socket/RubyBasicSocket.java
  32. +2 −0 src/org/jruby/ext/socket/RubyIPSocket.java
  33. +8 −0 src/org/jruby/ext/socket/RubySocket.java
  34. +2 −0 src/org/jruby/ext/socket/RubyTCPServer.java
  35. +2 −0 src/org/jruby/ext/socket/RubyUDPSocket.java
  36. +2 −0 src/org/jruby/ext/socket/RubyUNIXServer.java
  37. +2 −0 src/org/jruby/ext/socket/RubyUNIXSocket.java
  38. +8 −0 src/org/jruby/javasupport/Java.java
  39. +2 −0 src/org/jruby/javasupport/JavaArray.java
  40. +2 −0 src/org/jruby/javasupport/JavaArrayUtilities.java
  41. +2 −0 src/org/jruby/javasupport/JavaClass.java
  42. +2 −0 src/org/jruby/javasupport/JavaConstructor.java
  43. +2 −0 src/org/jruby/javasupport/JavaField.java
  44. +2 −0 src/org/jruby/javasupport/JavaMethod.java
  45. +2 −0 src/org/jruby/javasupport/JavaObject.java
  46. +2 −0 src/org/jruby/javasupport/proxy/JavaProxyClass.java
  47. +2 −0 src/org/jruby/javasupport/proxy/JavaProxyReflectionObject.java
  48. +2 −0 src/org/jruby/libraries/FiberLibrary.java
  49. +2 −0 src/org/jruby/libraries/RbConfigLibrary.java
  50. +5 −0 src/org/jruby/libraries/ThreadLibrary.java
View
@@ -6,6 +6,9 @@
require 'builtin/rdoc_jruby'
+
+warn "There is no code to actually generate the documentation right now, so you will overwrite existing documentation by doing this. Press any button to continue."
+gets
begin
JRuby::RDoc.install_doc(%w(org jruby))
rescue RDoc::RDocError => e
@@ -32,6 +32,7 @@
package org.jruby;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.exceptions.JumpException;
import org.jruby.internal.runtime.methods.DynamicMethod;
import org.jruby.runtime.Block;
@@ -51,6 +52,7 @@
* @author jpetersen
* @since 0.2.3
*/
+@JRubyClass(name="Method")
public class RubyMethod extends RubyObject {
protected RubyModule implementationModule;
protected String methodName;
@@ -37,11 +37,13 @@
import java.util.HashMap;
import java.util.Map;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyModule;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.util.ByteList;
import org.jruby.util.KCode;
+@JRubyModule(name="NKF")
public class RubyNKF {
public static final NKFCharset AUTO = new NKFCharset(0, "x-JISAutoDetect");
public static final NKFCharset JIS = new NKFCharset(1, "iso-2022-jp");
@@ -29,13 +29,15 @@
package org.jruby;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.runtime.Block;
import org.jruby.runtime.ObjectAllocator;
import org.jruby.runtime.builtin.IRubyObject;
/**
* @author Anders Bengtsson
*/
+@JRubyClass(name="NameError", parent="StandardError")
public class RubyNameError extends RubyException {
private IRubyObject name;
@@ -33,6 +33,7 @@
package org.jruby;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.runtime.ClassIndex;
import org.jruby.runtime.ObjectAllocator;
import org.jruby.runtime.builtin.IRubyObject;
@@ -41,6 +42,7 @@
*
* @author jpetersen
*/
+@JRubyClass(name="NilClass")
public class RubyNil extends RubyObject {
public RubyNil(Ruby runtime) {
super(runtime, runtime.getNilClass(), false);
@@ -27,10 +27,12 @@
package org.jruby;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.runtime.Block;
import org.jruby.runtime.ObjectAllocator;
import org.jruby.runtime.builtin.IRubyObject;
+@JRubyClass(name="NoMethodError", parent="NameError")
public class RubyNoMethodError extends RubyNameError {
private IRubyObject args;
@@ -36,6 +36,7 @@
import java.math.BigInteger;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.exceptions.RaiseException;
import org.jruby.javasupport.util.RuntimeHelpers;
import org.jruby.runtime.Block;
@@ -54,6 +55,7 @@
// TODO: Numeric.new works in Ruby and it does here too. However trying to use
// that instance in a numeric operation should generate an ArgumentError. Doing
// this seems so pathological I do not see the need to fix this now.
+@JRubyClass(name="Numeric", include="Comparable")
public class RubyNumeric extends RubyObject {
public static RubyClass createNumericClass(Ruby runtime) {
@@ -35,6 +35,7 @@
import java.util.List;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyModule;
import org.jruby.runtime.Arity;
import org.jruby.runtime.Block;
@@ -43,6 +44,7 @@
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.util.TypeConverter;
+@JRubyModule(name="ObjectSpace")
public class RubyObjectSpace {
/** Create the ObjectSpace module and add it to the Ruby runtime.
@@ -31,6 +31,7 @@
package org.jruby;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyModule;
import org.jruby.runtime.Block;
import org.jruby.runtime.CallbackFactory;
import org.jruby.runtime.ThreadContext;
@@ -40,6 +41,7 @@
*
* @author jpetersen
*/
+@JRubyModule(name="Precision")
public class RubyPrecision {
public static RubyModule createPrecisionModule(Ruby runtime) {
@@ -35,6 +35,7 @@
package org.jruby;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.exceptions.JumpException;
import org.jruby.internal.runtime.JumpTarget;
import org.jruby.runtime.Block;
@@ -46,6 +47,7 @@
/**
* @author jpetersen
*/
+@JRubyClass(name="Proc")
public class RubyProc extends RubyObject implements JumpTarget {
private Block block = Block.NULL_BLOCK;
private Block.Type type;
@@ -29,7 +29,9 @@
***** END LICENSE BLOCK *****/
package org.jruby;
+import org.jruby.anno.JRubyClass;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyModule;
import org.jruby.ext.posix.POSIX;
import org.jruby.runtime.Arity;
import org.jruby.runtime.Block;
@@ -46,6 +48,8 @@
/**
*/
+
+@JRubyModule(name="Process")
public class RubyProcess {
public static RubyModule createProcessModule(Ruby runtime) {
@@ -93,7 +97,8 @@ public static RubyModule createProcessModule(Ruby runtime) {
return process;
}
-
+
+ @JRubyClass(name="Process::Status")
public static class RubyStatus extends RubyObject {
private long status = 0L;
@@ -157,7 +162,8 @@ private long shiftedValue() {
return status << 8;
}
}
-
+
+ @JRubyModule(name="Process::UID")
public static class UserID {
@JRubyMethod(name = "change_privilege", required = 1, module = true)
public static IRubyObject change_privilege(IRubyObject self, IRubyObject arg) {
@@ -224,6 +230,7 @@ public static IRubyObject switch_rb(ThreadContext context, IRubyObject self, Blo
}
}
+ @JRubyModule(name="Process::GID")
public static class GroupID {
@JRubyMethod(name = "change_privilege", required = 1, module = true)
public static IRubyObject change_privilege(IRubyObject self, IRubyObject arg) {
@@ -290,6 +297,7 @@ public static IRubyObject switch_rb(ThreadContext context, IRubyObject self, Blo
}
}
+ @JRubyModule(name="Process::Sys")
public static class Sys {
@JRubyMethod(name = "getegid", module = true, visibility = Visibility.PRIVATE)
public static IRubyObject getegid(IRubyObject self) {
@@ -39,6 +39,7 @@
import java.io.IOException;
import java.util.List;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.exceptions.RaiseException;
import org.jruby.runtime.Block;
import org.jruby.runtime.CallbackFactory;
@@ -55,6 +56,7 @@
/**
* @author jpetersen
*/
+@JRubyClass(name="Range", include="Enumerable")
public class RubyRange extends RubyObject {
private IRubyObject begin;
@@ -46,6 +46,7 @@
import org.joni.WarnCallback;
import org.joni.encoding.Encoding;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.common.IRubyWarnings.ID;
import org.jruby.parser.ReOptions;
import org.jruby.runtime.Block;
@@ -65,6 +66,7 @@
/**
*
*/
+@JRubyClass(name="Regexp")
public class RubyRegexp extends RubyObject implements ReOptions, WarnCallback {
private KCode kcode;
private Regex pattern;
@@ -28,6 +28,7 @@
package org.jruby;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyModule;
import org.jruby.javasupport.util.RuntimeHelpers;
import org.jruby.runtime.Block;
import org.jruby.runtime.CallType;
@@ -37,6 +38,7 @@
import org.jruby.util.SignalFacade;
import org.jruby.util.NoFunctionalitySignalFacade;
+@JRubyModule(name="Signal")
public class RubySignal {
private final static SignalFacade SIGNALS = getSignalFacade();
@@ -48,6 +48,7 @@
import org.joni.encoding.Encoding;
import org.joni.encoding.specific.ASCIIEncoding;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.runtime.Block;
import org.jruby.runtime.CallbackFactory;
import org.jruby.runtime.ClassIndex;
@@ -69,6 +70,7 @@
* all users must synchronize externally with writers.
*
*/
+@JRubyClass(name="String", include={"Enumerable", "Comparable"})
public class RubyString extends RubyObject {
private static final ASCIIEncoding ASCII = ASCIIEncoding.INSTANCE;
@@ -32,6 +32,7 @@
import java.util.ArrayList;
import java.util.List;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.runtime.Block;
import org.jruby.runtime.MethodIndex;
@@ -43,6 +44,7 @@
import org.jruby.util.io.Stream;
import org.jruby.util.ByteList;
+@JRubyClass(name="StringIO")
public class RubyStringIO extends RubyObject {
private static ObjectAllocator STRINGIO_ALLOCATOR = new ObjectAllocator() {
public IRubyObject allocate(Ruby runtime, RubyClass klass) {
@@ -6,6 +6,7 @@
import org.joni.Region;
import org.joni.encoding.Encoding;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.common.IRubyWarnings.ID;
import org.jruby.runtime.Arity;
import org.jruby.runtime.Block;
@@ -17,6 +18,7 @@
* @author kscott
*
*/
+@JRubyClass(name="StringScanner")
public class RubyStringScanner extends RubyObject {
private RubyString str;
@@ -35,6 +35,7 @@
import java.util.List;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.runtime.Arity;
import org.jruby.runtime.Block;
import org.jruby.runtime.CallbackFactory;
@@ -57,6 +58,7 @@
/**
* @author jpetersen
*/
+@JRubyClass(name="Struct")
public class RubyStruct extends RubyObject {
private IRubyObject[] values;
@@ -39,6 +39,7 @@
import java.util.concurrent.locks.ReentrantLock;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.common.IRubyWarnings.ID;
import org.jruby.runtime.CallbackFactory;
import org.jruby.runtime.ClassIndex;
@@ -50,6 +51,7 @@
/**
* Represents a Ruby symbol (e.g. :bar)
*/
+@JRubyClass(name="Symbol")
public class RubySymbol extends RubyObject {
private final String symbol;
private final int id;
@@ -6,6 +6,7 @@
import java.util.HashMap;
import org.jruby.anno.JRubyMethod;
+import org.jruby.anno.JRubyClass;
import org.jruby.runtime.Arity;
import org.jruby.runtime.Block;
import org.jruby.runtime.ObjectAllocator;
@@ -17,6 +18,7 @@
import org.jruby.runtime.marshal.MarshalStream;
import org.jruby.runtime.marshal.UnmarshalStream;
+@JRubyClass(name="SystemCallError", parent="StandardError")
public class RubySystemCallError extends RubyException {
private IRubyObject errno = getRuntime().getNil();
Oops, something went wrong.

0 comments on commit 424a1cb

Please sign in to comment.