xp-framework/xp-framework — pull request #215 by thekid (2012-12-27 13:23:15+00:00)
Title: Reflecting constants

This pull request adds class, interface and enum constants to the command line reflection output (`xp -r`). It also adds a method `lang.XPClass::getConstants()`, which seems to have been forgotten while adding `getConstant($name)` and `hasConstant($name)` earlier on.

An example where this is useful:
```sh
$ xp -r text.regex.Pattern
@lang.FileSystemClassLoader
public class text.regex.Pattern extends lang.Object implements text.regex.Matcher {
const CASE_INSENSITIVE = 1
const MULTILINE = 2
const DOTALL = 4
const EXTENDED = 8
const ANCHORED = 16
const DOLLAR_ENDONLY = 32
const ANALYSIS = 64
const UNGREEDY = 128
const UTF8 = 256

protected static text.regex.Pattern::$flags
protected text.regex.Pattern::$regex
protected text.regex.Pattern::$utf8

public text.regex.Pattern __construct(string $regex, [int $flags= 0])

public static text.regex.Pattern compile(string $regex, [int $flags= 0]) throws lang.FormatException

public string toString()
public bool equals(lang.Generic $cmp)
public string hashCode()
public bool matches(string $input) throws lang.FormatException
public text.regex.MatchResult match(string $input) throws lang.FormatException
public text.regex.MatchResult replaceWith(string $replacement, string $input) throws lang.FormatException
public string getClassName()
public lang.XPClass getClass()
}
```