Open angelozerr opened 2 years ago
I'm implementing a custom pattern function which implements PatternFunction to visit pattern (element, attributes, etc pattern) to support XML completion based on RelaxNG similar to https://github.com/relaxng/jing-trang/blob/master/mod/pattern/src/main/com/thaiopensource/relaxng/pattern/DefaultValuesExtractor.java but I need to create my class in the com.thaiopensource.relaxng.pattern package because all classes which extends Pattern are not public https://github.com/relaxng/jing-trang/blob/84ec6ad578d6e0a77342baa5427851f98028bfd8/mod/pattern/src/main/com/thaiopensource/relaxng/pattern/ElementPattern.java#L6
com.thaiopensource.relaxng.pattern
I wonder why there is this restriction? Is it possible to add a public modifier for ElementPattern and other classes?
I'm not aware of any compelling reason for them not to be public.
Thanks @ndw for your answer. I will create a PR to fix this issue.
I'm implementing a custom pattern function which implements PatternFunction to visit pattern (element, attributes, etc pattern) to support XML completion based on RelaxNG similar to https://github.com/relaxng/jing-trang/blob/master/mod/pattern/src/main/com/thaiopensource/relaxng/pattern/DefaultValuesExtractor.java but I need to create my class in the
com.thaiopensource.relaxng.pattern
package because all classes which extends Pattern are not public https://github.com/relaxng/jing-trang/blob/84ec6ad578d6e0a77342baa5427851f98028bfd8/mod/pattern/src/main/com/thaiopensource/relaxng/pattern/ElementPattern.java#L6I wonder why there is this restriction? Is it possible to add a public modifier for ElementPattern and other classes?