poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1857518 [1/7] - in /xmlbeans/branches/xmlbeans-536: ./ src/jam/ src/jam/org/ src/jam/org/apache/ src/jam/org/apache/xmlbeans/ src/jam/org/apache/xmlbeans/impl/ src/jam/org/apache/xmlbeans/impl/jam/ src/jam/org/apache/xmlbeans/impl/jam/anno...
Date Sun, 14 Apr 2019 13:55:07 GMT
Author: kiwiwings
Date: Sun Apr 14 13:55:06 2019
New Revision: 1857518

URL: http://svn.apache.org/viewvc?rev=1857518&view=rev
Log:
(XMLBEANS-536) - Add Jam/annogen to sources

Added:
    xmlbeans/branches/xmlbeans-536/src/jam/
    xmlbeans/branches/xmlbeans-536/src/jam/org/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotatedElement.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotation.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotationValue.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JClass.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JComment.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JConstructor.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JElement.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JField.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JInvokable.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMember.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMethod.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JPackage.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JParameter.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JProperty.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JSourcePosition.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassIterator.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassLoader.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamService.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamServiceFactory.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamServiceParams.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamUtils.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/annotation/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/annotation/AnnotationProxy.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/annotation/DefaultAnnotationProxy.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/annotation/JavadocTagParser.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/annotation/LineDelimitedTagParser.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/annotation/TypedAnnotationProxyBase.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/annotation/WhitespaceDelimitedTagParser.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/CachedClassBuilder.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/DirectoryScanner.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/JamClassLoaderImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/JamLoggerImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/JamPrinter.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/JamServiceContextImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/JamServiceImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/TigerDelegate.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/classrefs/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/classrefs/DirectJClassRef.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/classrefs/JClassRef.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/classrefs/JClassRefContext.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/classrefs/QualifiedJClassRef.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/classrefs/UnqualifiedJClassRef.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/AnnotatedElementImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/AnnotationImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/AnnotationValueImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/ArrayClassImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/BuiltinClassImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/ClassImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/CommentImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/ConstructorImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/ElementContext.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/ElementImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/FieldImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/InvokableImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/MemberImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/MethodImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/PackageImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/ParameterImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/PrimitiveClassImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/PropertyImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/SourcePositionImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/UnresolvedClassImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/elements/VoidClassImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/javadoc/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/javadoc/JavadocClassBuilder.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/javadoc/JavadocClassloadingException.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/javadoc/JavadocResults.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/javadoc/JavadocRunner.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/javadoc/JavadocTigerDelegate.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/parser/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/parser/ParamStruct.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/parser/ParamStructPool.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/parser/ParserClassBuilder.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/reflect/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/reflect/ReflectClassBuilder.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/internal/reflect/ReflectTigerDelegate.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MAnnotatedElement.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MAnnotation.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MClass.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MComment.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MConstructor.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MElement.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MField.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MInvokable.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MMember.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MMethod.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MPackage.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MParameter.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/mutable/MSourcePosition.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/provider/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/provider/CompositeJamClassBuilder.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/provider/JamClassBuilder.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/provider/JamClassPopulator.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/provider/JamLogger.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/provider/JamServiceContext.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/provider/JamServiceFactoryImpl.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/provider/ResourcePath.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/visitor/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/visitor/CompositeJVisitor.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/visitor/CompositeMVisitor.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/visitor/JVisitor.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/visitor/MVisitor.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/visitor/PropertyInitializer.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/visitor/TraversingJVisitor.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/visitor/TraversingMVisitor.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/xml/
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/xml/JamXmlElements.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/xml/JamXmlReader.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/xml/JamXmlUtils.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/xml/JamXmlWriter.java
    xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/xml/TunnelledException.java
Modified:
    xmlbeans/branches/xmlbeans-536/build.xml

Modified: xmlbeans/branches/xmlbeans-536/build.xml
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/build.xml?rev=1857518&r1=1857517&r2=1857518&view=diff
==============================================================================
--- xmlbeans/branches/xmlbeans-536/build.xml (original)
+++ xmlbeans/branches/xmlbeans-536/build.xml Sun Apr 14 13:55:06 2019
@@ -103,6 +103,7 @@
         <pathelement location="src/typestore"/>
         <pathelement location="src/xmlcomp"/>
         <pathelement location="src/xmlconfig"/>
+        <pathelement location="src/jam"/>
         <pathelement location="src/jamsupport"/>
         <pathelement location="build/generated-sources"/>
     </path>
@@ -233,14 +234,7 @@
 
     <target name="process-resources" depends="-fetch-jars" description="Generate sources and resources based on schema files">
         <mkdir dir="build/classes"/>
-
-        <copy todir="build/generated-sources/org/apache/xmlbeans/impl">
-            <zipfileset src="lib/jam-0.1.0-src.jar" includes="src/org/**"/>
-            <cutdirsmapper dirs="3"/>
-            <filterchain>
-                <replacestring from="org.codehaus.jam" to="org.apache.xmlbeans.impl.jam"/>
-            </filterchain>
-        </copy>
+        <mkdir dir="build/generated-sources"/>
 
         <!-- Note that this is tricky because it bootstraps xmlbeans on itself. -->
         <!-- The basic strategy is to rely on the oldxbeans.jar checked into lib -->
@@ -450,7 +444,6 @@
             </classpath>
             <excludepackage name="repackage.*"/>
             <excludepackage name="org.apache.xmlbeans.impl.xb.*"/>
-            <excludepackage name="org.apache.xmlbeans.impl.jam.*"/>
             <link href="http://xmlbeans.apache.org/${version.base}/docs/reference/index.html"/>
             <link href="http://docs.oracle.com/javase/6/docs/api/"/>
             <link href="http://docs.oracle.com/javaee/6/api/"/>

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotatedElement.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotatedElement.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotatedElement.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotatedElement.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,84 @@
+package org.apache.xmlbeans.impl.jam;
+
+/**
+ * <p>Base abstraction for JElements which can carry annotations and comments.
+ * The only JElements which cannot do this are JAnnotation and JComment.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public abstract interface JAnnotatedElement extends JElement {
+
+  // ========================================================================
+  // Public methods
+
+  /**
+   * <p>Returns the metadata JAnnotations that are associated with
+   * this abstraction.  Returns an empty array if there are no
+   * annotations.</p>
+   */
+  public JAnnotation[] getAnnotations();
+
+  /**
+   * <p>Returns the JAnnotation which is being proxied by the given subclass
+   * of TypedAnnotationProxyBase, or null if no such annotation exists.  If it
+   * does exist, the <code>getProxy()</code> method on the returned
+   * object is guaranteed to return be an instance of the proxyClass.</p>
+   *
+   * @throws IllegalArgumentException if the proxyClass parameter is null
+   * or not a subclass of <code>TypedAnnotationProxyBase</code>.
+   */
+  public JAnnotation getAnnotation(Class proxyClass);
+
+  /**
+   * <p>Returns an instance of TypedAnnotationProxyBase on this elements for which the given
+   * proxy class has been established.  This method is guaranteed to
+   * return either an instance of the given proxyClass or null.</p>
+   *
+   * <p>This method is simply a convenient shorthand for
+   * <code>getAnnotation(proxyClass).getProxy()</code>.</p>
+   *
+   * @throws IllegalArgumentException if the proxyClass parameter is null
+   * or not a subclass of <code>AnnotationProxy</code>.
+   */
+  /**
+   * @deprecated
+   */ 
+  public Object getAnnotationProxy(Class proxyClass);
+
+  /**
+   * <p>Returns the annotation that represents the named 175 annotation
+   * or javadoc tag on this elements.</p>
+   */
+  public JAnnotation getAnnotation(String tagnameProxynameOr175typename);
+
+
+  /**
+   * Shortcut method which returns a given annotation value.  The 'valueId'
+   * should be a string of the format 'annotation-name@value-name'.  The
+   * value-name may be ommitted; if it is, it defaults to
+   * JAnntoation.SINGLE_MEMBER_VALUE.
+   *
+   * @param valueId
+   * @return
+   */
+  public JAnnotationValue getAnnotationValue(String valueId);
+
+  /**
+   * <p>Returns the comment associated with this abstraction.
+   * Returns null if it has no comment.</p>
+   */
+  public JComment getComment();
+
+  //expose these soon, remove getAllJavadocTags
+
+  //public JAnnotation[] getLiteralAnnotations();
+
+  //public JAnnotation[] getLiteralAnnotations(String annotationName);
+
+  /**
+   * @deprecated
+   */
+  public JAnnotation[] getAllJavadocTags();
+
+
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotation.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotation.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotation.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotation.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,105 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+/**
+ * <p>Represents a metadata that is associated with a particular
+ * JElement.  Note that JAnnoations are JElements, which means
+ * that they themselves can have annotations, and can be treated as
+ * nodes in a JAM hierarchy.</p>
+ *
+ * <p>Annotations can be simple or complex.  Values of simple
+ * annotations can be retrieved via the various get...Value() methods.
+ * Complex attributes can be navigated via the getAnnotations() method
+ * which exposes nested attributes (which may in turn be either simple
+ * or complex.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JAnnotation extends JElement {
+
+  // ========================================================================
+  // Constants
+
+  public String getSimpleName();
+  
+
+  public static final String SINGLE_VALUE_NAME = "value";
+
+  // ========================================================================
+  // Public methods
+
+  /**
+   * <p>If a typed annotation proxy has been registered for the annotation
+   * represented by this JAnnotation, returns this object.  Note that
+   * it's usually easier to access proxies by simply calling
+   * JAnnotatedElement.getAnnotationProxy(proxyClass).</p>
+   *
+   * <p>The value returned is guaranteed to be either a user-defined
+   * subclass of TypedAnnotationProxyBase or null.</p>
+   */
+  public Object getProxy();
+
+  /**
+   * <p>Returns an array of this annotation's member values.</p>
+   */
+  public JAnnotationValue[] getValues();
+
+  /**
+   * <p>Returns a structure which provides untyped, "by-name" access to
+   * the value of the named annotation member.
+   */
+  public JAnnotationValue getValue(String named);
+
+
+  // we're going to expose these with getArtifact() instead.
+
+  /**
+   * <p>Use of this method is *strongly* discouraged.</p>
+   *
+   * <p>If this JAnnotation represents a javadoc tag, returns the raw,
+   * untrimmed contents of the tag.  Otherwise, returns null.  You
+   * shouldn't use this method without a really good reason - you normally
+   * should call one of the getMember() methods to get at the tag contents.
+   * You can call getMember(SINGLE_MEMBER_NAME) to get a JAnnotationValue
+   * representing the contents of a simple javadoc tag (e.g. @mytag myvalue).
+   * </p>
+   */
+  //public String getJavadocTagText();
+
+  /**
+   * <p>If this JAnnotation corresponds to metadata that is stored in
+   * a JSR175 annotation (i.e. an instance of java.lang.annotation.Annotation),
+   * returns that annotation object.  Returns null if the annotation does
+   * not exist or is otherwise unavailable.</p>
+   *
+   * <p>Note that this is done only on a best-effort basis - the annotation
+   * object not be availble under pre-1.5 JREs and will generally only be
+   * available if the underlying annotation was view from a class file.  Note
+   * that the retention policy of the annotation type usually must also be
+   * RUNTIME.  Unless you are sure of all of these things, you are better
+   * off using an AnnotationProxy or the untyped value accessors
+   * (e.g. getValues()).</p>
+   *
+   * <p>If this method does return something other than null, it is guaranteed
+   * to be an instance of <code>java.lang.annotation.Annotation</code>.  It
+   * is typed here as <code>Object</code> simply to preserve API compatibility
+   * with Java 1.4.</p>.
+   */
+  public Object getAnnotationInstance();
+
+
+}
\ No newline at end of file

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotationValue.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotationValue.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotationValue.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JAnnotationValue.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,293 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * <p>Represents a member value of a JAnnotation.</p>
+ *
+ * <p><b>A note regarding enums</b></p>
+ *
+ * <p>The presence of metadata of 'enum' types poses a bit of a challenge
+ * in the untyped view of metadata that is presented by JAnnotationValue.
+ * Because JAM cannot assume that the enum definitions have been compiled,
+ * it is not possible for JAM to return an instance of an enumuerated type.
+ * In other words, it is not possible for JAnnotationValue to provide an
+ * asEnum() method.</p>
+ *
+ * <p>If JAM encounters an annotation value of an enumerated type, it will
+ * represent it with a JAnnotationValue such that calling <code>
+ * myAnnotationValue.getType().isEnumType()</code> will return true.
+ * Moreover, calling <code>myAnnotationValue.asString()</code> will return
+ * the name of the enumeration field, exactly as it appears in the
+ * type declaration.
+ * </p>
+ *
+ * @author Patrick Calahan <codehaus@bea.com>
+ */
+public interface JAnnotationValue {
+
+  //docme
+  public String getName();
+
+  //docme
+  public JClass getType();
+
+
+
+  /**
+   * <p>If this member is complex (i.e. an instance of another annotation
+   * type), this method returns a representation of the annotation instance.
+   * Returns null in all other samples.  This method always returns null if the
+   * annotation is a javdoc tag, as such tags only support one level of
+   * nesting.</p>
+   */
+  public JAnnotation asAnnotation();
+
+  /**
+   * <p>Returns the value of this member as a JClass.  Returns null if the
+   * value cannot be understood as a class name or if the type of the member
+   * is known to be something other than java.lang.Class.</p>
+   */
+  public JClass asClass();
+
+  /**
+   * <p>Returns the String value of the annotation.  If the value is
+   * known to be a simple, non-array type other than String, it will be
+   * converted in a resonable manner (with an appropriate toString() or
+   * String.valueOf() method). If the value is known to be complex or is an
+   * array, this method will return null.</p>
+   *
+   * <p>If no type information is available for the annotation member (i.e.
+   * it's a javadoc tag), then the raw textual value of the member is
+   * returned.</p>
+   */
+  public String asString();
+
+  /**
+   * <p>Returns the member's value as an int.  If the value is not known to be
+   * an int, (because it's a javadoc tag or because it's a 175 annotation
+   * member of a type other than int) asString() is called.  If the result is
+   * null, NumberFormatException is thrown.  Otherwise, the String is
+   * converted to an int with Integer.valueOf(), which again may throw
+   * NumberFormatException.</p>
+   */
+  public int asInt() throws NumberFormatException;
+
+  /**
+   * <p>Returns the member's value as a boolean.  If necessary, type
+   * conversion is performed in a similar manner as described for
+   * asInt(), except that IllegalArgumentException is
+   * thrown instead of NumberFormatException.</p>
+   */
+  public boolean asBoolean() throws IllegalArgumentException;
+
+  /**
+   * <p>Returns the member's value as a long.  If necessary, type
+   * conversion is performed in a similar manner as described for
+   * asInt().</p>
+   */
+  public long asLong() throws NumberFormatException;
+
+  /**
+   * <p>Returns the member's value as a short.  If necessary, type
+   * conversion is performed in a similar manner as described for
+   * asInt().</p>
+   */
+  public short asShort() throws NumberFormatException;
+
+  /**
+   * <p>Returns the member's value as a double.  If necessary, type
+   * conversion is performed in a similar manner as described for
+   * asInt().</p>
+   */
+  public double asDouble() throws NumberFormatException;
+
+  /**
+   * <p>Returns the member's value as a float.  If necessary, type
+   * conversion is performed in a similar manner as described for
+   * asInt().</p>
+   */
+  public float asFloat() throws NumberFormatException;
+
+  /**
+   * <p>Returns the member's value as a byte.  If necessary, type
+   * conversion is performed in a similar manner as described for
+   * asInt().</p>
+   */
+  public byte asByte() throws NumberFormatException;
+
+  /**
+   * <p>Returns the member's value as a char.  If necessary, type
+   * conversion is performed by calling getStringValue().  If the result
+   * is null or is a String that is not exactly of length 1,
+   * IllegalArgumentException is thrown.</p>
+   */
+  public char asChar() throws IllegalArgumentException;
+
+  /**
+   * <p>If this member is known to be of an array type, returns the value
+   * as an array of Objects.  If the array component type is primitive,
+   * the array objects will be instances of an appropriate java.lang
+   * wrapper (e.g., Integer).  Returns null if the member type is
+   * not an array.</p>
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  //public Object[] asArray();
+
+  /**
+   * <p>If this member is known to be an array of classes, returns an
+   * array of JClass representations of those classes.  If the memeber
+   * is known to be an array of a simple non-array type, this method
+   * will call asStringArray() and attempt to return a JClass
+   * by treating each string in the returned array as a qualified classname.
+   * Returns null otherwise.
+   * </p>
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public JClass[] asClassArray();
+
+  /**
+   * <p>If this member is known to be an array of annotations (i.e.
+   * complex, nested types), this method returns an array containing
+   * each complex value as a JAnnotation.  Returns null in all other samples.
+   * </p>
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public JAnnotation[] asAnnotationArray();
+
+  /**
+   * <p>Returns this member's value as an array of Strings.  If this member is
+   * not of an array type, or is an array of arrays or complex annotations,
+   * this method returns null.  If it is an array of a simple, non-array type
+   * other than String, conversion on each component will be attempted as
+   * described under getStringValue().</p>
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public String[] asStringArray();
+
+  /**
+   * <p>Returns this member's value as an array of ints.  If this member is
+   * not of an array type, or is an array of arrays or complex annotations,
+   * this method returns null.  If it is an array of a simple, non-array type
+   * other than int, conversion on each component will be attempted as
+   * described under getIntValue().</p>
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public int[] asIntArray() throws NumberFormatException;
+
+  /**
+   * <p>Returns this member's value as an array of booleans.  If necessary,
+   * type conversion is performed in a similar manner as described for
+   * asIntArray(), except that IllegalArgumentException may be
+   * thrown instead of NumberFormatException.</p>
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public boolean[] asBooleanArray() throws IllegalArgumentException;
+
+  /**
+   * <p>Returns this member's value as an array of shorts.  If necessary,
+   * type conversion is performed in a similar manner as described for
+   * asIntArray().
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public short[] asShortArray() throws NumberFormatException;
+
+  /**
+   * <p>Returns this member's value as an array of longs.  If necessary,
+   * type conversion is performed in a similar manner as described for
+   * asIntArray().
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public long[] asLongArray()  throws NumberFormatException;
+
+  /**
+   * <p>Returns this member's value as an array of doubles.  If necessary,
+   * type conversion is performed in a similar manner as described for
+   * asIntArray().
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public double[] asDoubleArray()  throws NumberFormatException;
+
+  /**
+   * <p>Returns this member's value as an array of floats.  If necessary,
+   * type conversion is performed in a similar manner as described for
+   * asIntArray().
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public float[] asFloatArray()  throws NumberFormatException;
+
+  /**
+   * <p>Returns this member's value as an array of bytes.  If necessary,
+   * type conversion is performed in a similar manner as described for
+   * asIntArray().
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public byte[] asByteArray()  throws NumberFormatException;
+
+  /**
+   * <p>Returns this member's value as an array of bytes.  If necessary,
+   * type conversion is performed in a similar manner as described for
+   * asIntArray() and asChar()..
+   *
+   * <p>This method always returns null for javadoc tags.</p>
+   */
+  public char[] asCharArray()  throws IllegalArgumentException;
+
+
+  /**
+   * <p>Returns true if the member's value was not explicitly set in the
+   * annotation instance but was instead taken from the member definition's
+   * default.</p>
+   *
+   * <p>Note that not all JAM implementations may be able to distinguish
+   * the case where the value is explicitly declared to be the same value
+   * as the member's default from the case where the value is not declared
+   * and the value is implicitly default.  In this event, this method
+   * will return true if and only if the effective value of the annotation
+   * is the same as the default value (regardless of how that value was
+   * declared).</p>
+   */
+  public boolean isDefaultValueUsed();
+
+
+
+  //return the 175 type accessor method?
+  //public JMethod getAccessor();
+
+  /**
+   * @deprecated DO NOT CALL THIS METHOD.  IT WILL BE REMOVED SOON.  This
+   * method is a bad thing because it forces/allows the caller to make
+   * assumptions about how the annotation value is actually represented
+   * in the underlying implementation.  Please use a combination
+   * of getType() and the various as...() methods instead.
+   */
+  public Object getValue();
+
+  
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JClass.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JClass.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JClass.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JClass.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,415 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * <p>Represents a Java class that may or may not be loaded in the VM.
+ * JClass is typically implemented in one of two ways: by wrapping a
+ * java.lang.Class or by parsing a source file directly with a tool
+ * such as javadoc or javelin.</p>
+ *
+ * <p>If a JClass represents an inner class, its getParent() method
+ * returns the outer class.  Otherwise, it returns the containing
+ * package.</p>
+ *
+ * <p><b>Important Note:</b> Because JAM's classloading machinery may swap
+ * instances of JClass out of memory at any time, you should never rely on
+ * instance equality (i.e., '==') when comparing two JClasses.  To illustrate:
+ * it is possible (though rather unlikely) that that the following expression
+ * will evaluate to false</p>
+ *
+ * <code>
+ *   JMethod myJMethod = ...
+ *   myJMethod.getReturnType() == myJMethod.getReturnType()
+ * </code>
+ *
+ * <p>Instead, you should always use equals()</p>
+
+ * <code>
+ *   myJMethod.getReturnType().equals(myJMethod.getReturnType())
+ * </code>
+ *
+ * <p>REVIEW a bunch of these methods (getMethods, getConstructors...)
+ * could throw SecurityException if the JClass is backed by
+ * java.lang.Class (see javadocs for Class).  We're currently ignoring
+ * this, because it seems unlikely and it seems heavyweight.  Seems
+ * ok?</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JClass extends JMember {
+
+  /**
+   * <p>Returns a JPackage which represents the package which contains
+   * this JClass.</p>
+   */
+  public JPackage getContainingPackage();
+
+  /**
+   * <p>Returns the Class representing the superclass of the entity
+   * (class, interface, primitive type or void) represented by this
+   * Class. If this Class represents either the Object class, an
+   * interface, a primitive type, or void, then null is returned. If
+   * this object represents an array class then the Class object
+   * representing the Object class is returned.
+   */
+  public JClass getSuperclass();
+
+  /**
+   * Returns an unordered array containing all of the interfaces directly
+   * implemented by this class.  Returns an empty array if no interfaces are
+   * implemented.
+   * REVIEW we probably want getInterfaces and getDeclaredInterfaces.
+   */
+  public JClass[] getInterfaces();
+
+  /**
+   * <p>REVIEW should we consider renaming this to getAllFields()?  I
+   * think this makes it more clear but is not consistent with
+   * java.lang.Class.</p>
+   *
+   * <p>Returns an unordered array containing Field objects reflecting all the
+   * accessible public fields of the class or interface represented by
+   * this Class object. The elements2 in the array returned are not
+   * sorted and are not in any particular order. This method returns
+   * an array of length 0 if the class or interface has no accessible
+   * public fields, or if it represents an array class, a primitive
+   * type, or void. </p>
+   *
+   * <p>Specifically, if this JClass object represents a class, this
+   * method returns the public fields of this class and of all its
+   * superclasses. If this JClass object represents an interface, this
+   * method returns the fields of this interface and of all its
+   * superinterfaces. </p>
+   *
+   * <p>The implicit length field for array class is not reflected by
+   * this method. User code should use the methods of class Array to
+   * manipulate arrays. </p>
+   *
+   * <p>Note that no guarantees are made about the ordering of fields in
+   * this array.</p>
+   *
+   * <p>See The Java Language Specification, sections 8.2 and
+   * 8.3. </p>
+   */
+  public JField[] getFields();
+
+
+  /**
+   * <p>Returns an unordered array of Field objects reflecting all the fields
+   * declared by the class or interface represented by this Class
+   * object. This includes public, protected, default (package)
+   * access, and private fields, but excludes inherited fields. The
+   * elements2 in the array returned are not sorted and are not in any
+   * particular order. This method returns an array of length 0 if the
+   * class or interface declares no fields, or if this Class object
+   * represents a primitive type, an array class, or void. </p>
+   *
+   * <p>See The Java Language Specification, sections 8.2 and 8.3.</p>
+   */
+  public JField[] getDeclaredFields();
+
+  /**
+   * <p>REVIEW should we consider renaming this to getAllMethods()?  I
+   * think this makes it more clear but is not consistent with
+   * java.lang.Class.</p>
+   *
+   * <p>Returns an array containing Method objects reflecting all the
+   * public member methods of the class or interface represented by
+   * this Class object, including those declared by the class or
+   * interface and and those inherited from superclasses and
+   * superinterfaces. The elements2 in the array returned are not
+   * sorted and are not in any particular order. This method returns
+   * an array of length 0 if this Class object represents a class or
+   * interface that has no public member methods, or if this Class
+   * object represents an array class, primitive type, or void.</p>
+   *
+   * <p>The class initialization method <clinit> is not included in
+   * the returned array. If the class declares multiple public member
+   * methods with the same parameter types, they are all included in
+   * the returned array. </p>
+   */
+  public JMethod[] getMethods();
+
+  /**
+   * <p>Returns an unordered array of Method objects reflecting all the
+   * methods declared by the class or interface represented by this Class
+   * object. This includes public, protected, default (package)
+   * access, and private methods, but excludes inherited methods. The
+   * elements2 in the array returned are not sorted and are not in any
+   * particular order. This method returns an array of length 0 if the
+   * class or interface declares no methods, or if this Class object
+   * represents a primitive type, an array class, or void. The class
+   * initialization method <clinit> is not included in the returned
+   * array. If the class declares multiple public member methods with
+   * the same parameter types, they are all included in the returned
+   * array. </p>
+   *
+   * <p>See The Java Language Specification, section 8.2. </p>
+   */
+  public JMethod[] getDeclaredMethods();
+
+  /**
+   * <p>Returns an unordered array containing Constructor objects reflecting
+   * all the public constructors of the class represented by this Class
+   * object. An array of length 0 is returned if the class has no
+   * public constructors, or if the class is an array class, or if the
+   * class reflects a primitive type or void. </p>
+   */
+  public JConstructor[] getConstructors();
+
+  // This is on java.lang.Class, but is it really useful?
+  //
+  //  public JConstructor[] getDeclaredConstructors();
+
+
+  /**
+   * Returns a representation of a java bean property as detailed in section
+   * 8.3 of the Java Beans specification, 'Design Patterns for Properties.'
+   * A JProperty can be thought of as a union of a getter method and
+   * corresponding setter method, although only one of these is required
+   * (view-only and write-only properties are returned).  Note that
+   * public fields are never considered properties, as deetailed in
+   * the specification.
+   */
+  public JProperty[] getProperties();
+
+  /**
+   * <p>Like getProperties(), but only considers methods explicitly declared
+   * on this class in identifying the properties.</p>
+   */
+  public JProperty[] getDeclaredProperties();
+
+  /**
+   * <p>Returns true if this JClass represents an interface.</p>
+   */
+  public boolean isInterface();
+
+  /**
+   * <p>Returns true if this JClass represents a JSR175 annotation type.</p>
+   */
+  public boolean isAnnotationType();
+
+  /**
+   * Return true if this JClass represents primitive type (int, long,
+   * double, and so forth).  Remember that primitive wrapper classes
+   * such as java.lang.Integer are NOT considered primitives.
+   */
+  public boolean isPrimitiveType();
+
+  /**
+   * Returns true if this class is a builtin type.  This is true if any
+   * of the following returns true: <code>isPrimitive(), isArray(),
+   * isVoid(),</code> or </code>isUnresolved.</code>.
+   * @return
+   */
+  public boolean isBuiltinType();
+
+  /**
+   * <p>If this JClass represents a primitive (isPrimitiveType() returns true),
+   * this method returns the java.lang.Class representing the class of
+   * the primitive.  For example, JClass representing an integer returns
+   * the equivalent of 'int.class' or 'java.lang.Integer.type.'
+   *
+   * @return The primitive class, or null if this is JClass is not primitive.
+   */
+  public Class getPrimitiveClass();
+
+  /**
+   * Return true if this class is final.
+   */
+  public boolean isFinal();
+
+  /**
+   * Return true if this class is static.  Note that top-level classes
+   * are never static.
+   */
+  public boolean isStatic();
+
+  /**
+   * Return true if this class is abstract.
+   */
+  public boolean isAbstract();
+
+  /**
+   * <p>Returns true if this JClass represents the void type.</p>
+   */
+  public boolean isVoidType();
+
+  /**
+   * <p>Returns true if this JClass represents java.lang.Object.</p>
+   */
+  public boolean isObjectType();
+
+  /**
+   * <p>Returns true if this JClass represents an array type.</p>
+   */
+  public boolean isArrayType();
+
+  /**
+   * <p>Returns the Class representing the component type of an array.
+   * If this JClass does not represent an array class this method
+   * returns null.</p>
+   *
+   * <p>Note that this method differs substantially from
+   * <code>java.lang.Class.getComponentType()</code> in the way it
+   * treats multidimensional arrays.  Specifically, let
+   * <code>fooArrayClass</code> be the class of an n dimensional array
+   * of class <code>foo</code> for n > 2.  For the java.lang.Class
+   * representation of <code>fooArrayClass</code>,
+   * <code>getComponentType()</code> will return a java.lang.Class for
+   * an (n-1)-dimensional array of <code>foo</code>s.  By contrast,
+   * the JClass representation of <code>fooArrayClass</code> will
+   * always simply return a JClass representing <code>foo</code> for
+   * any value of n > 1.</p>
+   *
+   * <p>In other words, this method always returns the 'core' type of
+   * the array, effectively hiding away all of the intermediary array
+   * types.  Given that JClass provides the additional
+   * <code>getArrayDimensions</code> facility, it is felt that this is
+   * a much easier convention for tool authors to work with.</p>
+   */
+  public JClass getArrayComponentType();
+
+  /**
+   * <p>If this JClass represents an array type (isArray() == true),
+   * returns the number of dimensions in the array.  Otherwise returns
+   * zero.</p>
+   */
+  public int getArrayDimensions();
+
+  /**
+   * <p>Determines if the class or interface represented by this Class
+   * object is either the same as, or is a superclass or
+   * superinterface of, the class or interface represented by the
+   * specified Class parameter. It returns true if so; otherwise it
+   * returns false. If this Class object represents a primitive type,
+   * this method returns true if the specified Class parameter is
+   * exactly this Class object; otherwise it returns false.</p>
+   *
+   * <p>Specifically, this method tests whether the type represented
+   * by the specified Class parameter can be converted to the type
+   * represented by this Class object via an identity conversion or
+   * via a widening reference conversion. See The Java Language
+   * Specification, sections 5.1.1 and 5.1.4 , for details.</p>
+   */
+  public boolean isAssignableFrom(JClass clazz);
+
+  /**
+   * Two JClasses are always considered equal as long as their
+   * qualified names are the same.
+   */
+  public boolean equals(Object o);
+
+  /**
+   * <p>Returns an unordered array containing the inner classes for this class.
+   * The array contains JClass objects representing all the public classes and
+   * interfaces that are members of the class represented by this JClass.  This
+   * includes public class and interface members inherited from
+   * superclasses and public class and interface members declared by
+   * the class. This method returns an array of length 0 if this Class
+   * object has no public member classes or interfaces. This method
+   * also returns an array of length 0 if this JClass object
+   * represents a primitive type, an array class, or void. </p>
+   *
+   * <p>Note that no guarantees are made about the ordering of classes
+   * in this array.</p>
+   */
+  public JClass[] getClasses();
+
+  /**
+   * <p>If this JClass is an inner class, returns the outer class.  If
+   * the class or interface represented by this JClass object is a
+   * member of another class, returns the JClass object representing
+   * the class in which it was declared. This method returns null if
+   * this class or interface is not a member of any other class. If
+   * this JClass object represents an array class, a primitive type,
+   * or void, then this method returns null.</p>
+   */
+  public JClass getContainingClass();
+
+  /**
+   * <p>Returns the name of this member in the format described in
+   * section 4.3.2 of the VM spec, 'Field Descriptors.'  This is the
+   * same nasty format returned by java.lang.Class.getName(), and is
+   * the format you need to use in calls to Class.forName().  For
+   * example, the ClassfileName of the class of a two-dimensional
+   * array of strings is <code>[[Ljava.lang.String;</code>.  For
+   * details, see
+   * http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html</p>
+   */
+  public String getFieldDescriptor();
+
+  /**
+   * <p>Returns true if this class is an enumerated type.</p>
+   */
+  public boolean isEnumType();
+
+  /**
+   *
+   * @return
+   */
+  //public boolean isGenericType();
+
+  /**
+   * <p>Returns the JamClassLoader which loaded this class.</p>
+   */
+  public JamClassLoader getClassLoader();
+
+  /**
+   * Shorthand for myClass.getClassLoader().loadClass(name)
+   */
+  public JClass forName(String name);
+
+  /**
+   * <p>Returns an unordered array of classes that were explicitly imported by
+   * this class using an import statement.  It does not include any classes
+   * that might be imported via package imports (i.e. with the '*' wildcard),
+   * nor does it include any classes that are simply used via fully-qualified
+   * name in the body of this class.</p>
+   *
+   * <p>Note that this is an optional operation; if the source for the class
+   * is not available (i.e. this JClass is backed by a java.lang.Class), then
+   * this method will return an array of length 0.</p>
+   */
+  public JClass[] getImportedClasses();
+
+  /**
+   * <p>Returns an unordered set of JPackages which are imported by this class
+   * using a package import statement (i.e. with the '*' wildcard), as well as
+   * the containing packages of all of the JClasses returned by <code>
+   * getImportedClasses()</code>.</p>
+   *
+   * <p>Note that this is an optional operation; if the source for the
+   * class is not available (i.e. this JClass is backed by a
+   * java.lang.Class), then this method will return an array of length
+   * 0.</p>
+   */
+  public JPackage[] getImportedPackages();
+
+  /**
+   * <p>Returns true if a backing entity for this class could not be
+   * resolved.  This will be true, for example, of the JClass which
+   * you get when requesting a method's return type when no class for
+   * that type can be found.  In this case, the JClass will be have
+   * only a name - all other properties will be null/empty.</p>
+   */
+  public boolean isUnresolvedType();
+
+
+
+}
\ No newline at end of file

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JComment.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JComment.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JComment.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JComment.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,38 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+/**
+ * <p>Encapsulates comment associated with a package, class,
+ * method, and so on.  Although they are often declared in the same
+ * place (code comments) JComment is a distinct entity from
+ * JAnnotation.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JComment extends JElement {
+
+  /**
+   * Returns the text of this comment.
+   */
+  public String getText();
+
+  /**
+   * Returns the location of this comment in the source, or null if it
+   * is unknown.
+   */
+  public JSourcePosition getSourcePosition();
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JConstructor.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JConstructor.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JConstructor.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JConstructor.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,44 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+/**
+ * <p>Represents a constructor of a java class.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JConstructor extends JInvokable {
+
+  /**
+   * <p>Returns a qualied name for this method as specified by
+   * <code>java.lang.reflect.Constructor.toString()</code>:</p>
+   *
+   * <p><i>Returns a string describing this Constructor. The string is formatted
+   * as the constructor access modifiers, if any, followed by the
+   * fully-qualified name of the declaring class, followed by a parenthesized,
+   * comma-separated list of the constructor's formal parameter types.
+   * For example:<i></p>
+   *
+   * <p><i>public java.util.Hashtable(int,float)</i></p>
+   *
+   * <p><i>The only possible modifiers for constructors are the access modifiers
+   * public, protected or private. Only one of these may appear, or none if
+   * the constructor has default (package) access.</i></p>
+   */
+  public String getQualifiedName();
+
+
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JElement.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JElement.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JElement.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JElement.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,92 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+import org.apache.xmlbeans.impl.jam.visitor.JVisitor;
+
+/**
+ * <p>The root of the java type object model.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public abstract interface JElement {
+
+  /**
+   * <p>Returns the parent of this abstraction, or null if this
+   * annotation represents a root abstraction (i.e. a JPackage).  The
+   * JElement hierarchy looks like this:</p>
+   *
+   * <pre>
+   *     JPackage
+   *       JClass
+   *         JConstructor
+   *         JField
+   *         JMethod
+   *           JParameter
+   *         JProperty
+   *         JClass (inner class)...
+   * </pre>
+   *
+   * <p>Additionally, any of the abstractions above may in turn have
+   * child JAnnotations, which may themselves have child
+   * JAnnotations.</p>
+   */
+  public JElement getParent();
+
+  /**
+   * <p>Returns a simple name of this abstraction.  The exact format
+   * of the name depends on the particular abstraction (see javadoc).
+   * Please refer to the JAM package documentation for more details on
+   * naming conventions.</p>
+   */
+  public String getSimpleName();
+
+  /**
+   * <p>Returns a qualified name for this abstraction.  The exact format of
+   * this name depends on the particular abstraction.  Please refer to the
+   * documentation for each JElement subclass for a detailed description
+   * of the qualified name formats.</p>
+   */
+  public String getQualifiedName();
+
+  /**
+   * Returns an object describing the source file position of this
+   * elements, or null if the position is unknown on not applicable.
+   */
+  public JSourcePosition getSourcePosition();
+
+
+  /**
+   * <p>Accepts the given visitor.</p>
+   */
+  public void accept(JVisitor visitor);
+
+
+  /**
+   * <p>This is not something you want to mess with.  It's here only for the
+   * benefit of some JAM implementations which need a handle back to the
+   * actual implementation-specific object which is being proxied by this
+   * JElement.</p>
+   * @return
+   */
+  public Object getArtifact();
+
+  /**
+   * <p>Returns the same String as getQualifiedName().</p>
+   */
+  public String toString();
+  
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JField.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JField.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JField.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JField.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,72 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * <p>Represents an exposed field on a Java class.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JField extends JMember {
+
+  /**
+   * Returns the type of this field.
+   */
+  public JClass getType();
+
+  /**
+   * Return true if this field is final.
+   */
+  public boolean isFinal();
+
+  /**
+   * Return true if this field is static.
+   */
+  public boolean isStatic();
+
+  /**
+   * Return true if this field is volatile.
+   */
+  public boolean isVolatile();
+
+  /**
+   * Return true if this field is transient.
+   */
+  public boolean isTransient();
+
+
+  /**
+   * <p>Returns a qualied name for this method as specified by
+   * <code>java.lang.reflect.Field.toString()</code>:</p>
+   *
+   * <p><i>Returns a string describing this Field. The format is the access
+   * modifiers for the field, if any, followed by the field type, followed
+   * by a space, followed by the fully-qualified name of the class declaring
+   * the field, followed by a period, followed by the name of the field.
+   * For example:</i></p>
+   *
+   * <p><i>public static final int java.lang.Thread.MIN_PRIORITY</i></p>
+   * <p><i>private int java.io.FileDescriptor.fd</i></p>
+   *
+   * <p><i>The modifiers are placed in canonical order as specified by "The
+   * Java Language Specification". This is public, protected or private
+   * first, and then other modifiers in the following order: static, final,
+   * transient, volatile.</i></p>
+   */
+  public String getQualifiedName();
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JInvokable.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JInvokable.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JInvokable.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JInvokable.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,80 @@
+/*
+* The Apache Software License, Version 1.1
+*
+*
+* Copyright (c) 2003 The Apache Software Foundation.  All rights
+* reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+*
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in
+*    the documentation and/or other materials provided with the
+*    distribution.
+*
+* 3. The end-user documentation included with the redistribution,
+*    if any, must include the following acknowledgment:
+*       "This product includes software developed by the
+*        Apache Software Foundation (http://www.apache.org/)."
+*    Alternately, this acknowledgment may appear in the software itself,
+*    if and wherever such third-party acknowledgments normally appear.
+*
+* 4. The names "Apache" and "Apache Software Foundation" must
+*    not be used to endorse or promote products derived from this
+*    software without prior written permission. For written
+*    permission, please contact apache@apache.org.
+*
+* 5. Products derived from this software may not be called "Apache
+*    XMLBeans", nor may "Apache" appear in their name, without prior
+*    written permission of the Apache Software Foundation.
+*
+* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+* SUCH DAMAGE.
+* ====================================================================
+*
+* This software consists of voluntary contributions made by many
+* individuals on behalf of the Apache Software Foundation and was
+* originally based on software copyright (c) 2003 BEA Systems
+* Inc., <http://www.bea.com/>. For more information on the Apache Software
+* Foundation, please see <http://www.apache.org/>.
+*/
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * <p>Base abstraction for something which can be invoked, i.e. a
+ * JConstructor or JMethod.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public abstract interface JInvokable extends JMember {
+  /**
+   * <p>Returns representations of the parameters taken by this
+   * method.  Returns an array of length 0 if the method takes no
+   * parameters.</p>
+   */
+  public JParameter[] getParameters();
+
+  /**
+   * <p>Returns representations of the type of each of the exceptions
+   * which can be thrown by this method.  Returns an array of length 0
+   * if the method throws no exceptions.</p>
+   */
+  public JClass[] getExceptionTypes();
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMember.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMember.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMember.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMember.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,88 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * <p>Represents an abstraction which can be member of a class.  Such
+ * abstractions include: constructors, methods, fields, and classes
+ * (in the case of inner classes).  JMember's share the following
+ * attributes in common: they have some level of access protection
+ * (public/protected/private) and are (usually) contained within a
+ * class.</p>
+ *
+ * <p>Because classes themselves can be members of other classes,
+ * JClass extends JMember.  In the case where a JClass represents a
+ * top-level class (i.e. not an inner class),
+ * JMember.getContainingClass() will always return null.</p>
+ *
+ * <p>Note that the various access protection levels are all mutually
+ * exclusive.  For a given abstraction, only one of isPrivate(),
+ * isPackagePrivate(), isProtected(), or isPublic() will return true.
+ * Note that this information is also exposed via getModifiers(),
+ * which returns a bit-field that is identical to that described in
+ * java.lang.reflect.Modifier.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public abstract interface JMember extends JAnnotatedElement {
+
+  // ========================================================================
+  // Public methods
+
+  /**
+   * <p>Returns a representation of the class which contains this
+   * member.  Note that if this member is an inner class, this method
+   * returns the class in which this class is declared (i.e. 'outer').
+   * If this member is a top-level class, this method will always
+   * return null.</p>
+   */
+  public JClass getContainingClass();
+
+  /**
+   * <p>Returns the modifiers specifier.  This is a bit field exactly
+   * like those returned by java.lang.Class.getModifiers() and can be
+   * manipulated using java.lang.reflect.Modifier in the same way.</p>
+   */
+  public int getModifiers();
+
+  /**
+   * Return true if this member is package private (i.e. the default
+   * access protection level).
+   */
+  public boolean isPackagePrivate();
+
+  /**
+   * Return true if this member is private.  Equivalent to calling
+   * Modifier.isPrivate(member.getModifiers()).
+   */
+  public boolean isPrivate();
+
+  /**
+   * Return true if this member is protected.  Equivalent to calling
+   * Modifier.isProtected(member.getModifiers()).
+   */
+  public boolean isProtected();
+
+  /**
+   * Return true if this member is public.  Equivalent to calling
+   * Modifier.isProtected(member.getModifiers()).
+   */
+  public boolean isPublic();
+
+
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMethod.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMethod.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMethod.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JMethod.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,92 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * Represents a method of a java class.
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JMethod extends JInvokable {
+
+  /**
+   * Returns a JClass object representing the type of this methods
+   * return value.  Note that void methods will return a JClass
+   * representing void.</p>
+   */
+  public JClass getReturnType();
+
+  /**
+   * Return true if this method is declared final.
+   */
+  public boolean isFinal();
+
+  /**
+   * Return true if this method is static.
+   */
+  public boolean isStatic();
+
+  /**
+   * Return true if this member is final.  Note that constructors are
+   * fields are never abstract.
+   */
+  public boolean isAbstract();
+
+  /**
+   * Returns true if this method is declared native.
+   */
+  public boolean isNative();
+
+  /**
+   * Returns true if this method is declared synchronized.
+   */
+  public boolean isSynchronized();
+
+  /**
+   * <p>Returns a qualied name for this method as specified by
+   * <code>java.lang.reflect.Method.toString()</code>:</p>
+   *
+   * <p><i>
+   * Returns a string describing this Method. The string is formatted as
+   * the method access modifiers, if any, followed by the method return
+   * type, followed by a space, followed by the class declaring the method,
+   * followed by a period, followed by the method name, followed by a
+   * parenthesized, comma-separated list of the method's formal parameter
+   * types. If the method throws checked exceptions, the parameter list is
+   * followed by a space, followed by the word throws followed by a
+   * comma-separated list of the thrown exception types. For example:</i></p>
+   *
+   * <p><i>public boolean java.lang.Object.equals(java.lang.Object)</i></p>
+   *
+   * <p><i>The access modifiers are placed in canonical order as specified by
+   * "The Java Language Specification". This is public, protected or private
+   * first, and then other modifiers in the following order: abstract,
+   * static, final, synchronized native.</i></p>
+   */
+  public String getQualifiedName();
+
+
+  /**
+   * Returns the name of this class in the format described in section
+   * 4.3.3 of the VM spec, 'Class File Format: Method Descriptors.'
+   * This is the nasty format of the name returned by
+   * java.lang.reflect.Method.getName().  For details, see
+   * http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
+   */
+  //  public String getMethodDescriptor();   dunno if this is useful
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JPackage.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JPackage.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JPackage.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JPackage.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,41 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * Represents a java package. Provides access to information about the
+ * package, the package's comment and tags, and the classes in the
+ * package.
+ *
+ * <p>FIXME how are we handling the default package?  i think it
+ * should be a package with an empty string for a name, but we need to
+ * make sure this works and document it.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JPackage extends JAnnotatedElement {
+
+  /**
+   * Returns the classes in this package which were specified as part
+   * of the JRoot construction.  Note that this does not necessarily
+   * include all of the classes that are actually in the package (it
+   * may not contain any specified classes at all).
+   */
+  public JClass[] getClasses();
+
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JParameter.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JParameter.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JParameter.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JParameter.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,59 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * Represents a single parameter of a Java method or constructor.
+ * This type and name information as well as associated metadata.
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JParameter extends JAnnotatedElement {
+
+  /**
+   * Returns the type of this parameter.
+   */
+  public JClass getType();
+
+
+  /**
+   * Returns the position of this parameter in its enclosing method's
+   * or constructor's list of parameters.
+   *
+   * This is commented out because as a general rule, it's probably bad
+   * to expose this information; it violates the notion that a contained
+   * object shouldn't know anything about how it is contained.  I waver
+   * on it a little because there are a some samples where (esp. in annogen)
+   * where it is useful to know this, primarily due to the fact that
+   * the reflection API does not treat parameters as first-class citizens.
+   *
+   * @return
+   */
+  //public int getNumber();
+
+
+
+  // REVIEW: This would be nice, but there is currently no way to find
+  // this out via either javadoc or reflection.  I guess it's not
+  // clear that this is going to be very useful anyway.
+  /**
+   * Return true if this parameter is final.
+   */
+  //  public boolean isFinal();
+}
+

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JProperty.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JProperty.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JProperty.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JProperty.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,55 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+
+
+/**
+ * <p>This is a helper class which provides java.beans-like
+ * functionality in the JAM framework.
+
+ extension to the JAM framework that encapsulates the notion of a
+ * javabean properties.  This class can be used to get similar
+ * functionality in JAM that is provided by the java.beans.*
+ * packge.</p>
+ *
+ * <p>An array of JProperties for a given JClass can be retrieved
+ * using the getProperties factory method.</p>
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JProperty extends JAnnotatedElement {
+
+  // ========================================================================
+  // Public methods
+
+  /**
+   * Returns a JClass which represents the type of this property.
+   */
+  public JClass getType();
+
+  /**
+   * Returns a JMethod which represents the setter for this property.
+   * Returns null if this property is view-only.
+   */
+  public JMethod getSetter();
+
+  /**
+   * Returns a JMethod which represents the getter for this property.
+   * Returns null if this property is write-only.
+   */
+  public JMethod getGetter();
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JSourcePosition.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JSourcePosition.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JSourcePosition.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JSourcePosition.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,43 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+import java.net.URI;
+
+/**
+ * Describes a specific point in a source file.
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JSourcePosition {
+
+  /**
+   * Returns the text column number for this source position, or -1 if
+   * it is not known.
+   */
+  public int getColumn();
+
+  /**
+   * Returns the text line number for this source position, or -1 if
+   * it is not known.
+   */
+  public int getLine();
+
+  /**
+   * Returns the URI of the source file, or null if it is not known.
+   */
+  public URI getSourceURI();
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassIterator.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassIterator.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassIterator.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassIterator.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,106 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+import java.util.Iterator;
+
+/**
+ * A typed Iterator on a set of JClasses.
+ *
+ * The use of JamClassIterator (as opposed to arrays or Collections of JClass)
+ * is encouraged as it can significantly reduce memory consumption when
+ * using JAM to process large numbers of java classes.
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public class JamClassIterator implements Iterator {
+
+  // ========================================================================
+  // Variables
+
+  private JamClassLoader mLoader;
+  private String[] mClassNames;
+  private int mIndex = 0;
+
+  // ========================================================================
+  // Constructor
+
+  /**
+   * Constructs a new JamClassIterator
+   *
+   * @param loader JamClassLoader from which to load the classes
+   * @param classes Array of full-qualified classnames to iterate on.
+   *
+   * @throws IllegalArgumentException if either argument is null.
+   */
+  public JamClassIterator(JamClassLoader loader, String[] classes) {
+    if (loader == null) throw new IllegalArgumentException("null loader");
+    if (classes == null) throw new IllegalArgumentException("null classes");
+    mLoader = loader;
+    mClassNames = classes;
+  }
+
+  // ========================================================================
+  // Public methods
+
+  /**
+   * Returns the next class.  Exactly equivalent to (JClass)next().
+   *
+   * @throws IndexOutOfBoundsException if there are no classes left to
+   * iterate on.
+   */
+  public JClass nextClass() {
+    if (!hasNext()) throw new IndexOutOfBoundsException();
+    mIndex++;
+    return mLoader.loadClass(mClassNames[mIndex-1]);
+  }
+
+  // ========================================================================
+  // Iterator implementation
+
+  /**
+   * Returns true if classes remain to be iterated upon.
+   */
+  public boolean hasNext() {
+    return mIndex < mClassNames.length;
+  }
+
+
+  /**
+   * Returns the next class.
+   *
+   * @throws IndexOutOfBoundsException if there are no classes left to
+   * iterate on.
+   */
+  public Object next() { return nextClass(); }
+
+  // ========================================================================
+  // Public methods
+
+  public int getSize() { return mClassNames.length; }
+
+  // ========================================================================
+  // Unsupported methods
+
+  /**
+   * Not supported.
+   *
+   * @throws UnsupportedOperationException
+   */
+  public void remove() {
+    throw new UnsupportedOperationException();
+  }
+}

Added: xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassLoader.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassLoader.java?rev=1857518&view=auto
==============================================================================
--- xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassLoader.java (added)
+++ xmlbeans/branches/xmlbeans-536/src/jam/org/apache/xmlbeans/impl/jam/JamClassLoader.java Sun Apr 14 13:55:06 2019
@@ -0,0 +1,66 @@
+/*   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.xmlbeans.impl.jam;
+
+/**
+ * Object which can load representations of a java.lang.Class.
+ * Analagous to a java.lang.ClassLoader.
+ *
+ * @author Patrick Calahan &lt;email: pcal-at-bea-dot-com&gt;
+ */
+public interface JamClassLoader {
+
+  /**
+   * <p>Returns a representation of the named class.  If the class is
+   * not under the same root as this JElement root, a representation
+   * of it will be synthesized via reflection (see note in class
+   * comments).  The 'named' parameter must be a fully-qualified class
+   * name in the classfile 'Field Descriptor' format, a simple
+   * primitive name (e.g. 'long' or 'int'), or 'void'.</p>
+   *
+   * <p>A note regarding fully-qualified class names: if you're
+   * looking up a non-array type by name, you can just pass the
+   * regular, fully-qualified name.  If you're looking up an array
+   * type, you need to use the 'Field Descriptor' format as described
+   * in secion 4.3.2 of the VM spec.  This is the same name format
+   * that is returned by JClass.getFieldDescriptor.</p>
+   *
+   * <p>Inner classes cannot be loaded with this method.  To load an inner
+   * class, you must load the outer class first and then call getClasses().
+   * </p>
+   *
+   * <p>Note that this method always returns some JClass - it never
+   * returns null or throws ClassNotFoundException.  If neither a
+   * sourcefile not a classfile could be located for the named class,
+   * a stubbed-out JClass will be returned with the isUnresolved()
+   * flag set to true.  This JClass will have a name (as determined by
+   * the given descriptor), but no other information about it will be
+   * available.</p>
+   *
+   * @throws IllegalArgumentException if the parameter is null or not
+   * a valid class name.
+   */
+  public JClass loadClass(String fieldDescriptor);
+
+  /**
+   * Returns a representation of a package having the given name.
+
+   * @throws IllegalArgumentException if the parameter is null or not
+   * a valid package name.
+   */
+  public JPackage getPackage(String qualifiedPackageName);
+
+}
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message