Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow documenting overloaded java classes #23

Closed
bb opened this issue Jul 18, 2009 · 3 comments
Closed

Allow documenting overloaded java classes #23

bb opened this issue Jul 18, 2009 · 3 comments

Comments

@bb
Copy link
Contributor

bb commented Jul 18, 2009

It's currently not possible to generate docs for ruby methods which overload Java classes.

It would be great if YARD would just accept classes defined in JRuby style. Recreating the package structure as modules would be a plus!

Here's some reference:

A warning and the source is shown:

[warn]: in YARD::Handlers::Ruby::Legacy::ClassHandler: Undocumentable class: class org::example::Test
[warn]: in file 'overriding_java.rb':16:

# overriding a java class
class org::example::Test # this is line 16
  # a new method for Test
  def i_am_new
    puts "i am new"
  end

  # @overload test() from java
  def self.test
    puts "test in ruby"
  end
end

The Java code (which would be documented via javadoc, no worries here):
package org.example;
class Test {
public static void test() {
System.out.println("test in java");
}
}

@bb
Copy link
Contributor Author

bb commented Jul 18, 2009

Please take a look at #24. I accidently closed it and it's not yet possible to reopen issues in github. Bug #24 is similar to that one but additionally throws an exception.

@lsegal
Copy link
Owner

lsegal commented Jun 16, 2010

Since JRuby now supports the Java::Package::Class syntax, I think it would be better to require that syntax. Updating the parser to accept the org.package.Class syntax would be extremely difficult given YARD's design, and 1.9.x users would be unable to take advantage of this functionality (1.9 uses Ripper to parse which directly makes use of Ruby's own parsing rules and therefore cannot be adjusted).

@bb
Copy link
Contributor Author

bb commented Jun 16, 2010

I agree. I already changed all my code to the Java::Package::Class syntax once I figured that out.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants