harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Fedotov <alexei.fedo...@gmail.com>
Subject Re: Android Javadocs
Date Fri, 17 Apr 2009 05:27:37 GMT
Hello Jesse,
You brought brilliant news. I look forward for your contribution. The
official page on how to contribute is here [1]. Feel free to ask any
questions.

[1] http://harmony.apache.org/contribution_policy.html







On Fri, Apr 17, 2009 at 5:05 AM, Jesse Wilson <jessewilson@google.com> wrote:
> Hi!
> I'm a developer on the Android core libraries, many of which are derived
> from Harmony. In October, Android Dan Bornstein
> said<http://markmail.org/message/7o2w7asiftn7o3dl> that
> "A Day Of Reckoning would someday come", where we reintegrate Android and
> Harmony sources. I'm working on that effort.
>
> One major difference between Harmony and Android is the Javadocs. We've
> written lots. For example, here's our docs on
> java.util.regex.Pattern<http://developer.android.com/reference/java/util/regex/Pattern.html>
> ,
>
> Represents a pattern used for matching, searching, or replacing strings.
> Patterns are specified in terms of regular expressions and compiled using an
> instance of this class. They are then used in conjunction with a
> Matcher<http://developer.android.com/reference/java/util/regex/Matcher.html>
> to
> perform the actual search.
>
> A typical use case looks like this:
>
>
>  Pattern p = Pattern.compile("Hello, A[a-z]*!");
>
>  Matcher m = p.matcher("Hello, Android!");
>  boolean b1 = m.matches(); // true
>
>  m.setInput("Hello, Robot!");
>  boolean b2 = m.matches(); // false
>
>
> The above code could also be written in a more compact fashion, though this
> variant is less efficient, since Pattern and Matcher objects are created on
> the fly instead of being reused. fashion:
>
>
>     boolean b1 = Pattern.matches("Hello, A[a-z]*!", "Hello, Android!"); // true
>     boolean b2 = Pattern.matches("Hello, A[a-z]*!", "Hello, Robot!");
>  // false
>
>
> Please consult the package
> documentation<http://developer.android.com/reference/java/util/regex/package.html>
> for
> an overview of the regular expression syntax used in this class as well as
> Android-specific implementation details.
>
> Harmony's docs are comparatively
> sparse<http://www.jdocs.com/harmony/5.M5/java/util/regex/Pattern.html>
> :
>
> Pattern implements a compiler for regular expressions as defined by the J2SE
> specification. The regular expression syntax is largely similar to the
> syntax defined by Perl 5 but has both omissions and extensions. A formal and
> complete definition of the regular expression syntax is not provided by the
> J2SE speTBD (TODO)
>
>
> We Androids would love to contribute this documentation to Harmony.
> Alongside improving the Harmony doc at large, it brings our copy of the code
> closer in-sync with yours, which is a big win for us.
>
> Would Harmony like the Android Javadoc?
>
> How could we contribute it? I could start with a .patch for say, the regex
> module, and we could work from there.
>
> Cheers,
> Jesse
>



-- 
With best regards / с наилучшими пожеланиями,
Alexei Fedotov / Алексей Федотов,
http://www.telecom-express.ru/
http://people.apache.org/~aaf/
http://harmony.apache.org/
http://code.google.com/p/openmeetings/

Mime
View raw message