You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2006/07/05 15:16:58 UTC

svn commit: r419224 [1/3] - in /beehive/wsm/trunk: ./ src/core/org/apache/beehive/wsm/processor/ src/core/org/apache/beehive/wsm/processor/apt/ src/core/org/apache/beehive/wsm/processor/checker/ src/core/org/apache/beehive/wsm/processor/generator/ src/...

Author: ekoneil
Date: Wed Jul  5 06:16:53 2006
New Revision: 419224

URL: http://svn.apache.org/viewvc?rev=419224&view=rev
Log:
Add abstraction layer for WSM -- this code is a slight generalization of what Rich wrote for NetUI's compiler so that it could work for both XDoclet and for Java 5 annotations.  In order to support Axis2, an implementation for annogen will need to be added.

The changes here are:

- create Glass, a Mirror-like API that acts as an abstraction between the code that deals directly with the metadata and allows metadata to come from many sources
- migrate the WSM annotation checker and model builder onto Glass from Mirror.  

In the long run, this is code that should live in Jakarta Commons or in a top-level Beehive sub-project as it's now used in two places.

More work remains to implement the annogen layer so that this can be run inside of Axis2.

Test: WSM pass


Added:
    beehive/wsm/trunk/src/glass/
    beehive/wsm/trunk/src/glass/org/
    beehive/wsm/trunk/src/glass/org/apache/
    beehive/wsm/trunk/src/glass/org/apache/beehive/
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/
      - copied from r413523, beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/typesystem/
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/
      - copied from r413523, beehive/trunk/netui/src/compiler-apt/org/apache/beehive/netui/compiler/typesystem/impl/
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/DelegatingAnnotationProcessor.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/util/AnnotationUtil.java
Removed:
    beehive/wsm/trunk/build-schema.xml
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/jaxrpc/
Modified:
    beehive/wsm/trunk/BUILDING.txt
    beehive/wsm/trunk/build.xml
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/TwoPhaseAnnotationProcessor.java
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/WsmResourceGenerator.java
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorTypeResolver.java
    beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorWsmServiceFactory.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/TypesystemElement.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationInstance.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeElementDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationValue.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ClassDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ConstructorDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Declaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ExecutableDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/FieldDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/InterfaceDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MemberDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MethodDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Modifier.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/PackageDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ParameterDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeParameterDeclaration.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/env/CoreAnnotationProcessor.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/env/CoreAnnotationProcessorEnv.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/env/Filer.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/env/Messager.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/DelegatingImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/WrapperFactory.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/AnnotationInstanceImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/AnnotationTypeDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/AnnotationTypeElementDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/AnnotationValueImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/ClassDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/ConstructorDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/DeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/ExecutableDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/FieldDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/InterfaceDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/MemberDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/MethodDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/ModifierImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/PackageDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/ParameterDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/TypeDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/declaration/TypeParameterDeclarationImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/env/CoreAnnotationProcessorEnvImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/env/FilerImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/env/MessagerImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/env/SourcePositionImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/AnnotationTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/ArrayTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/ClassTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/DeclaredTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/ErrorTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/InterfaceTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/PrimitiveTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/ReferenceTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/TypeInstanceImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/TypeVariableImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/impl/type/VoidTypeImpl.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/AnnotationType.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/ArrayType.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/ClassType.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/DeclaredType.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/InterfaceType.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/PrimitiveType.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/ReferenceType.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/TypeInstance.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/TypeVariable.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/type/VoidType.java
    beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/util/SourcePosition.java
    beehive/wsm/trunk/test/build.xml

Modified: beehive/wsm/trunk/BUILDING.txt
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/BUILDING.txt?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/BUILDING.txt (original)
+++ beehive/wsm/trunk/BUILDING.txt Wed Jul  5 06:16:53 2006
@@ -52,4 +52,4 @@
 Together, this might be:
 
   get http://www.ibiblio.org/maven/xmlbeans/jars/jsr173_1.0_api.jar > jsr173_1.0_api.jar
-  mvn install:install-file -Dfile=<path-to-jar>/jsr173_1.0_api.jar -DgroupId=xmlbeans -DartifactId=xmlbeans-jsr173-api -Dversion=2.0-dev -Dpackaging=jar                           
\ No newline at end of file
+  mvn install:install-file -Dfile=jsr173_1.0_api.jar -DgroupId=xmlbeans -DartifactId=jsr173_1.0_api -Dversion=1.0 -Dpackaging=jar
\ No newline at end of file

Modified: beehive/wsm/trunk/build.xml
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/build.xml?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/build.xml (original)
+++ beehive/wsm/trunk/build.xml Wed Jul  5 06:16:53 2006
@@ -84,6 +84,7 @@
         <pathelement location="${api.classes}"/>
         <pathelement location="${core.classes}"/>
         <pathelement location="${webservice-utils-core.classes}"/>
+        <pathelement location="build/classes/glass"/>
     </path>
  
     <path id="axis.classpath">
@@ -161,6 +162,11 @@
         <echo message="|      WSM Core build starting                   |"/>
         <echo message="--------------------------------------------------"/>
 
+        <mkdir dir="build/classes/glass"/>
+        <javac destdir="build/classes/glass" debug="${debug}">
+            <src path="src/glass"/>
+        </javac>
+
         <mkdir dir="${webservice-utils-core.classes}"/>
         <javac destdir="${webservice-utils-core.classes}" classpathref="core.classpath" debug="${debug}">
             <src path="${webservice-utils-core.dir}"/>
@@ -180,6 +186,7 @@
         <jar jarfile="${wsm.jar}">
             <fileset dir="${core.classes}"/>
             <fileset dir="${webservice-utils-core.classes}"/>
+            <fileset dir="build/classes/glass"/>
             <manifest>
                 <attribute name="Extension-Name" value="Beehive WSM Library"/> 
                 <attribute name="Specification-Title" value="Beehive WSM Library"/> 
@@ -403,5 +410,26 @@
             </exec>
         </sequential>
     </macrodef>
+
+    <!-- Targets for building a wsm-schema.jar file that contains generated source files.  Useful for building WSM in an IDE environment -->
+    <property name="xsd.schema.dir" location="src/schema-wsdl"/>
+    <property name="api.schema.dir" location="src/api/schemas"/>
+    <property name="schema.jar" location="wsm-schema.jar"/>
+    <property name="schema.build.dir" location="build-schema"/>
+
+    <target name="build-schema">
+        <echo message="generate"/>
+        <build-schemas srcdir="${xsd.schema.dir}" destdir="${schema.build.dir}"/>
+        <build-schemas srcdir="${api.schema.dir}" destdir="${schema.build.dir}"/>
+    </target>
+
+   <target name="schema-jar">
+        <jar jarfile="${schema.jar}" basedir="${schema.build.dir}"/>
+   </target>
+
+    <target name="schema-clean">
+        <delete dir="${schema.build.dir}"/>
+        <delete file="${schema.jar}"/>
+    </target>
 
 </project>

Modified: beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/TwoPhaseAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/TwoPhaseAnnotationProcessor.java?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/TwoPhaseAnnotationProcessor.java (original)
+++ beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/TwoPhaseAnnotationProcessor.java Wed Jul  5 06:16:53 2006
@@ -19,9 +19,9 @@
 
 import java.util.Set;
 
-import com.sun.mirror.apt.AnnotationProcessor;
-import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.AnnotationTypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.env.CoreAnnotationProcessorEnv;
+import org.apache.beehive.common.glass.typesystem.env.CoreAnnotationProcessor;
 
 /**
  * The TwoPhaseAnnotationProcessor class is an abstract class that implements the APT
@@ -59,12 +59,13 @@
  * Filer etc).
  */
 abstract public class TwoPhaseAnnotationProcessor
-    implements AnnotationProcessor {
+    implements CoreAnnotationProcessor {
 
     private Set<AnnotationTypeDeclaration> _atds;
-    private AnnotationProcessorEnvironment _env;
+    private CoreAnnotationProcessorEnv _env;
 
-    public TwoPhaseAnnotationProcessor(Set<AnnotationTypeDeclaration> atds, AnnotationProcessorEnvironment env) {
+    public TwoPhaseAnnotationProcessor(Set<AnnotationTypeDeclaration> atds,
+                                       CoreAnnotationProcessorEnv env) {
         _atds = atds;
         _env = env;
     }
@@ -89,7 +90,7 @@
      */
     public abstract void generate();
 
-    protected AnnotationProcessorEnvironment getAnnotationProcessorEnvironment() {
+    protected CoreAnnotationProcessorEnv getAnnotationProcessorEnvironment() {
         return _env;
     }
 

Modified: beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java (original)
+++ beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java Wed Jul  5 06:16:53 2006
@@ -17,17 +17,6 @@
  */
 package org.apache.beehive.wsm.processor.apt;
 
-import org.apache.beehive.wsm.processor.TwoPhaseAnnotationProcessor;
-import org.apache.beehive.wsm.processor.generator.axis.AxisGenerator;
-import org.apache.beehive.wsm.processor.generator.WsmResourceGenerator;
-import org.apache.beehive.wsm.processor.checker.Jsr181AnnotationChecker;
-import com.sun.mirror.declaration.Declaration;
-import com.sun.mirror.declaration.AnnotationTypeDeclaration;
-import com.sun.mirror.declaration.TypeDeclaration;
-import com.sun.mirror.declaration.InterfaceDeclaration;
-import com.sun.mirror.declaration.ClassDeclaration;
-import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-
 import java.util.Set;
 import java.util.LinkedList;
 import java.util.Collection;
@@ -35,6 +24,18 @@
 import java.util.Map;
 import java.lang.reflect.Method;
 
+import org.apache.beehive.wsm.processor.TwoPhaseAnnotationProcessor;
+import org.apache.beehive.wsm.processor.generator.axis.AxisGenerator;
+import org.apache.beehive.wsm.processor.generator.WsmResourceGenerator;
+import org.apache.beehive.wsm.processor.checker.Jsr181AnnotationChecker;
+import org.apache.beehive.common.glass.typesystem.declaration.ClassDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.InterfaceDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.AnnotationTypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.Declaration;
+import org.apache.beehive.common.glass.typesystem.declaration.TypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.env.CoreAnnotationProcessorEnv;
+import org.apache.beehive.common.glass.typesystem.impl.declaration.TypeDeclarationImpl;
+import org.apache.beehive.common.glass.typesystem.impl.env.CoreAnnotationProcessorEnvImpl;
 
 public class WsmAnnotationProcessor
     extends TwoPhaseAnnotationProcessor {
@@ -44,7 +45,7 @@
 
     private String DEFAULT_RESOURCE_GENERATOR = AxisGenerator.class.getName();
 
-    public WsmAnnotationProcessor(Set<AnnotationTypeDeclaration> atds, AnnotationProcessorEnvironment env) {
+    public WsmAnnotationProcessor(Set<AnnotationTypeDeclaration> atds, CoreAnnotationProcessorEnv env) {
         super(atds, env);
     }
 
@@ -53,9 +54,9 @@
         /*
         create lists of the classes and interfaces to process
         */
-        AnnotationProcessorEnvironment env = getAnnotationProcessorEnvironment();
+        CoreAnnotationProcessorEnv env = getAnnotationProcessorEnvironment();
         for(AnnotationTypeDeclaration atd : getAnnotationTypeDeclarations()) {
-            Collection<Declaration> decls = env.getDeclarationsAnnotatedWith(atd);
+            Declaration[] decls = env.getDeclarationsAnnotatedWith(atd);
             for(Declaration decl : decls) {
                 if(decl instanceof InterfaceDeclaration)
                     getServiceInterfaces().add((InterfaceDeclaration)decl);
@@ -104,6 +105,12 @@
             TypeDeclaration typeDecl = (TypeDeclaration)decl;
 
             WsmResourceGenerator generator = lookupResourceGenerator();
+/*
+            com.sun.mirror.declaration.TypeDeclaration mirrorTypeDeclaration =
+                (com.sun.mirror.declaration.TypeDeclaration)(((TypeDeclarationImpl)typeDecl).getDelegate());
+            com.sun.mirror.apt.AnnotationProcessorEnvironment aptEnv =
+                (com.sun.mirror.apt.AnnotationProcessorEnvironment)(((CoreAnnotationProcessorEnvImpl)getAnnotationProcessorEnvironment()).getDelegate());
+*/
             generator.generate(getAnnotationProcessorEnvironment(), typeDecl);
         }
     }

Modified: beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java (original)
+++ beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java Wed Jul  5 06:16:53 2006
@@ -21,11 +21,18 @@
 import java.util.Collections;
 import java.util.Arrays;
 import java.util.Set;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
 
 import com.sun.mirror.apt.AnnotationProcessorFactory;
 import com.sun.mirror.apt.AnnotationProcessor;
 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.env.CoreAnnotationProcessorEnv;
+import org.apache.beehive.common.glass.typesystem.env.CoreAnnotationProcessor;
+import org.apache.beehive.common.glass.typesystem.impl.env.CoreAnnotationProcessorEnvImpl;
+import org.apache.beehive.common.glass.typesystem.impl.WrapperFactory;
+import org.apache.beehive.common.glass.typesystem.impl.DelegatingAnnotationProcessor;
+import org.apache.beehive.common.glass.typesystem.declaration.AnnotationTypeDeclaration;
 
 public class WsmAnnotationProcessorFactory
     implements AnnotationProcessorFactory, Jsr181AnnotationConstants {
@@ -44,7 +51,7 @@
             SOAP_PACKAGE_PREFIX + SOAP_MESSAGE_HANDLERS,
         }));
 
-    private static final Collection<String> supportedOptions =
+    private static final Collection<String> SUPPORTED_OPTIONS =
         Collections.unmodifiableCollection(Arrays.asList(new String[] {
             PROCESSOR_OPTIONS_RESOURCE_GENERATOR
         }));
@@ -54,11 +61,22 @@
     }
 
     public Collection<String> supportedOptions() {
-        return supportedOptions;
+        return SUPPORTED_OPTIONS;
     }
 
-    public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds,
+    public AnnotationProcessor getProcessorFor(Set<com.sun.mirror.declaration.AnnotationTypeDeclaration> atds,
                                                AnnotationProcessorEnvironment env) {
-        return new WsmAnnotationProcessor(atds, env);
+
+        CoreAnnotationProcessorEnv wrapperEnv = CoreAnnotationProcessorEnvImpl.get( env );
+        Set set = new LinkedHashSet();
+        int j = 0;
+        for (Iterator i = atds.iterator(); i.hasNext();) {
+            com.sun.mirror.declaration.AnnotationTypeDeclaration decl =
+                    (com.sun.mirror.declaration.AnnotationTypeDeclaration)i.next();
+            set.add(WrapperFactory.get().getAnnotationTypeDeclaration(decl));
+        }
+
+        CoreAnnotationProcessor apDelegate = new WsmAnnotationProcessor(set, wrapperEnv);
+        return new DelegatingAnnotationProcessor(apDelegate);
     }
 }

Modified: beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java (original)
+++ beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java Wed Jul  5 06:16:53 2006
@@ -41,15 +41,17 @@
 import javax.wsdl.PortType;
 import javax.xml.namespace.QName;
 
-import com.sun.mirror.declaration.TypeDeclaration;
-import com.sun.mirror.declaration.ClassDeclaration;
-import com.sun.mirror.declaration.InterfaceDeclaration;
-import com.sun.mirror.declaration.Modifier;
-import com.sun.mirror.declaration.MethodDeclaration;
-import com.sun.mirror.declaration.ConstructorDeclaration;
-import com.sun.mirror.declaration.ParameterDeclaration;
-import com.sun.mirror.apt.Messager;
-import com.sun.mirror.type.VoidType;
+import org.apache.beehive.common.glass.typesystem.declaration.ClassDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.MethodDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.TypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.InterfaceDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.ConstructorDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.Modifier;
+import org.apache.beehive.common.glass.typesystem.declaration.ParameterDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.AnnotationInstance;
+import org.apache.beehive.common.glass.typesystem.env.Messager;
+import org.apache.beehive.common.glass.typesystem.type.VoidType;
+import org.apache.beehive.common.glass.typesystem.util.AnnotationUtil;
 import org.xml.sax.InputSource;
 
 /**
@@ -94,7 +96,7 @@
             _messager.printNotice("Checking web service implementation bean: " + typeDecl.getSimpleName());
             validateClassDeclaration((ClassDeclaration)typeDecl);
 
-            Collection<? extends MethodDeclaration> methods = typeDecl.getMethods();
+            MethodDeclaration[] methods = typeDecl.getMethods();
             for(MethodDeclaration methodDecl : methods) {
                 validateMethod(methodDecl);
             }
@@ -103,7 +105,7 @@
             _messager.printNotice("Checking web service endpoint interface: " + typeDecl.getSimpleName());
             validateInterfaceDeclaration((InterfaceDeclaration)typeDecl);
 
-            Collection<? extends MethodDeclaration> methods = typeDecl.getMethods();
+            MethodDeclaration[] methods = typeDecl.getMethods();
             for(MethodDeclaration methodDecl : methods) {
                 validateMethod(methodDecl);
             }
@@ -113,7 +115,7 @@
 
     private void validateClassDeclaration(ClassDeclaration classDecl) {
 
-        WebService wsAnnotation = classDecl.getAnnotation(WebService.class);
+        AnnotationInstance wsAnnotation = AnnotationUtil.getAnnotation(classDecl, WebService.class.getName());
         if(wsAnnotation == null)
             _messager.printError("No @WebService annotation found");
 
@@ -130,9 +132,9 @@
 
         /* check for a default constructor */
         boolean hasDefaultConstructor = false;
-        Collection<ConstructorDeclaration> ctors = classDecl.getConstructors();
+        ConstructorDeclaration[] ctors = classDecl.getConstructors();
         for(ConstructorDeclaration ctor : ctors) {
-            if(ctor.getModifiers().contains(Modifier.PUBLIC) && ctor.getParameters().size() == 0)
+            if(ctor.getModifiers().contains(Modifier.PUBLIC) && ctor.getParameters().length == 0)
                 hasDefaultConstructor = true;
         }
 
@@ -142,9 +144,9 @@
         /* ensure no finalize() method */
         boolean hasFinalizer = false;
         {
-            Collection<MethodDeclaration> methods = classDecl.getMethods();
+            MethodDeclaration[] methods = classDecl.getMethods();
             for(MethodDeclaration method : methods) {
-                if(method.getSimpleName().equals("finalize") && method.getParameters().size() == 0)
+                if(method.getSimpleName().equals("finalize") && method.getParameters().length == 0)
                     hasFinalizer = true;
             }
         }
@@ -152,10 +154,10 @@
         if(hasFinalizer)
             _messager.printError("Service implementation can not have a finalize() method");
 
-        HandlerChain handlerChain = classDecl.getAnnotation(HandlerChain.class);
-        SOAPMessageHandlers soapHandlers = classDecl.getAnnotation(SOAPMessageHandlers.class);
+        AnnotationInstance handlerChain = AnnotationUtil.getAnnotation(classDecl, HandlerChain.class.getName());
+        AnnotationInstance soapMessageHandlers = AnnotationUtil.getAnnotation(classDecl, SOAPMessageHandlers.class.getName());
 
-        if(handlerChain != null && soapHandlers != null) {
+        if(handlerChain != null && soapMessageHandlers != null) {
             _messager.printError("Service implementation can not have both SOAP handlers and a handler chain");
         }
 
@@ -168,7 +170,7 @@
         if(wsAnnotation == null)
             return;
 
-        String endpointInterface = wsAnnotation.endpointInterface();
+        String endpointInterface = AnnotationUtil.getStringValue(wsAnnotation, "endpointInterface");
         /*
         The service implementation is bound to the contract specified in the service interface.  Thus,
         there are annotation values that are explicitly disallowed on the implementation in order to
@@ -176,31 +178,41 @@
         */
         if(!endpointInterface.equals("")) {
 
-            if(!wsAnnotation.name().equals(""))
+            String wsName = AnnotationUtil.getStringValue(wsAnnotation, "name");
+            if(!wsName.equals(""))
                 _messager.printError("Service implementation bean can not use the @WebService's name attribute");
 
-            if(!wsAnnotation.targetNamespace().equals(""))
+            String targetNamespace = AnnotationUtil.getStringValue(wsAnnotation, "targetNamespace");
+            if(!targetNamespace.equals(""))
                 _messager.printError("Service implementation bean can not use the @WebService's targetNamespace attribute");
 
-            if(!wsAnnotation.wsdlLocation().equals(""))
+            String wsdlLocation = AnnotationUtil.getStringValue(wsAnnotation, "wsdlLocation");
+            if(!wsdlLocation.equals(""))
                 _messager.printError("Service implementation bean can not use the @WebService's wsdlLocation attribute");
 
             /* ensure no @WebMethod or @Oneway methods*/
-            Collection<MethodDeclaration> methods = classDecl.getMethods();
+            MethodDeclaration[] methods = classDecl.getMethods();
             for(MethodDeclaration method : methods) {
-                if(method.getAnnotation(Oneway.class) != null)
+                AnnotationInstance annotation = null;
+
+                annotation = AnnotationUtil.getAnnotation(method, Oneway.class.getName());
+                if(annotation != null)
                     _messager.printError("Service implementation bean can not declare a method as @Oneway");
 
-                if(method.getAnnotation(WebMethod.class) != null)
+                annotation = AnnotationUtil.getAnnotation(method, WebMethod.class.getName());
+                if(annotation != null)
                     _messager.printError("Service implementation bean can not declare a method as @WebMethod");
 
-                Collection<ParameterDeclaration> params = method.getParameters();
+                ParameterDeclaration[] params = method.getParameters();
                 for(ParameterDeclaration param : params) {
-                    if(param.getAnnotation(WebParam.class) != null)
+
+                    annotation = AnnotationUtil.getAnnotation(param, WebParam.class.getName());
+                    if(annotation != null)
                         _messager.printError("Service implementation bean can not declare a web method parameter as @WebParam");
                 }
 
-                if(method.getAnnotation(WebResult.class) != null)
+                annotation = AnnotationUtil.getAnnotation(method, WebResult.class.getName());
+                if(annotation != null)
                     _messager.printError("Service implementation bean can use a @WebResult on a web method");
             }
         }
@@ -210,7 +222,7 @@
                     - relative or absolute URL to a WSDL file
                     - check consistency with the portType and bindings declared in the WSDL
             */
-            String wsdlLocation = wsAnnotation.wsdlLocation();
+            String wsdlLocation = AnnotationUtil.getStringValue(wsAnnotation, "wsdlLocation");
             if(!wsdlLocation.equals("")) {
                 try {
                     URL wsdlURL = new URL(wsdlLocation);
@@ -244,11 +256,13 @@
         if(!intfDecl.getModifiers().contains(Modifier.PUBLIC))
             _messager.printError("Service endpoint interface must be public");
 
-        WebService wsAnnot = intfDecl.getAnnotation(WebService.class);
-        if(!"".equals(wsAnnot.serviceName()))
+        AnnotationInstance wsAnnot = AnnotationUtil.getAnnotation(intfDecl, WebService.class.getName());
+        String serviceName = AnnotationUtil.getStringValue(wsAnnot, "serviceName");
+        if(!"".equals(serviceName))
             _messager.printError("Service endpoint interface can not use the @WebService's serviceName attribute");
 
-        if(!"".equals(wsAnnot.endpointInterface()))
+        String endpointInterface = AnnotationUtil.getStringValue(wsAnnot, "endpointInterface");
+        if(!"".equals(endpointInterface))
             _messager.printError("Service endpoint interface can not use the @WebService's endpointInterface attribute");
 
         /* todo: handle @WebMethod annotations for customizing the mapping to a WSDL */
@@ -256,25 +270,28 @@
 
     private void validateMethod(MethodDeclaration methodDecl) {
 
-        WebMethod webMethod = methodDecl.getAnnotation(WebMethod.class);
-        Oneway oneway = methodDecl.getAnnotation(Oneway.class);
-        Collection<ParameterDeclaration> params = methodDecl.getParameters();
+        AnnotationInstance webMethod = AnnotationUtil.getAnnotation(methodDecl, WebMethod.class.getName());
+        AnnotationInstance oneway = AnnotationUtil.getAnnotation(methodDecl, Oneway.class.getName());
+        ParameterDeclaration[] params = methodDecl.getParameters();
 
         if(oneway != null) {
             if(!(methodDecl.getReturnType() instanceof VoidType))
                 _messager.printError("@Oneway method " + methodDecl.getSimpleName() + " has illegal return type: " + methodDecl.getReturnType());
 
+/* todo: support thrown types
             if(methodDecl.getThrownTypes().size() > 0)
-                _messager.printError("@oneway method " + methodDecl.getSimpleName() + " can not declare exceptions");
+                _messager.printError("@Oneway method " + methodDecl.getSimpleName() + " can not declare exceptions");
+*/
 
             /* ensure no OUT or INOUT parameters */
             for(ParameterDeclaration param : params) {
-                WebParam webParam = param.getAnnotation(WebParam.class);
+                AnnotationInstance webParam = AnnotationUtil.getAnnotation(param, WebParam.class.getName());
 
                 if(webParam != null) {
-                    if(webParam.mode() == WebParam.Mode.OUT)
+                    String mode = AnnotationUtil.getEnumValue(webParam, "mode");
+                    if(WebParam.Mode.OUT.toString().equals(mode))
                         _messager.printError("@Oneway method can not have a @WebParam with mode OUT");
-                    else if(webParam.mode() == WebParam.Mode.INOUT)
+                    else if(WebParam.Mode.INOUT.toString().equals(mode))
                         _messager.printError("@Oneway method can not have a @WebParam with mode INOUT");
                 }
             }
@@ -288,9 +305,20 @@
         }
 
         /* implement section 6.1.2.2 checks for Style validation*/
-        SOAPBinding soapBinding = methodDecl.getDeclaringType().getAnnotation(SOAPBinding.class);
-        SOAPBinding.Style style = soapBinding != null ? soapBinding.style() : SOAPBinding.Style.DOCUMENT;
-        SOAPBinding.ParameterStyle parameterStyle = soapBinding != null ? soapBinding.parameterStyle() : SOAPBinding.ParameterStyle.WRAPPED;
+        AnnotationInstance soapBinding = AnnotationUtil.getAnnotation(methodDecl.getDeclaringType(), SOAPBinding.class.getName());
+
+        SOAPBinding.Style style = null;
+        SOAPBinding.ParameterStyle parameterStyle = null;
+
+        String styleStr = AnnotationUtil.getStringValue(soapBinding, "style");
+        if(styleStr == null || styleStr.equals("") || SOAPBinding.Style.DOCUMENT.toString().equals(styleStr))
+            style = SOAPBinding.Style.DOCUMENT;
+        else style = SOAPBinding.Style.RPC;
+
+        String paramStyleStr = AnnotationUtil.getStringValue(soapBinding, "parameterStyle");
+        if(paramStyleStr == null || paramStyleStr.equals("") || SOAPBinding.ParameterStyle.WRAPPED.toString().equals(paramStyleStr))
+            parameterStyle = SOAPBinding.ParameterStyle.WRAPPED;
+        else parameterStyle = SOAPBinding.ParameterStyle.BARE;
 
         if(style == SOAPBinding.Style.DOCUMENT) {
             if(parameterStyle == SOAPBinding.ParameterStyle.BARE) {
@@ -299,8 +327,12 @@
 
                 int inParams = 0;
                 for(ParameterDeclaration paramDecl : params) {
-                    WebParam webParam = paramDecl.getAnnotation(WebParam.class);
-                    if(webParam == null || (webParam.mode() == WebParam.Mode.IN && !webParam.header()))
+                    AnnotationInstance webParam = AnnotationUtil.getAnnotation(paramDecl, "WebParam");
+                    String mode = AnnotationUtil.getEnumValue(webParam, "mode");
+                    Boolean isHeader = AnnotationUtil.getBooleanValue(webParam, "header");
+
+                    if(webParam == null ||
+                        (WebParam.Mode.IN.toString().equals(mode) && (isHeader != null && !isHeader.booleanValue())))
                         inParams++;
                 }
 
@@ -313,17 +345,21 @@
             }
 
             for(ParameterDeclaration paramDecl : params) {
-                WebParam webParam = paramDecl.getAnnotation(WebParam.class);
+                AnnotationInstance webParam = AnnotationUtil.getAnnotation(paramDecl, WebParam.class.getName());
 
-                SOAPBinding soapBindingAnnot = methodDecl.getDeclaringType().getAnnotation(SOAPBinding.class);
-                boolean isDocumentStyle = soapBindingAnnot == null || soapBindingAnnot.style() == SOAPBinding.Style.DOCUMENT;
+                AnnotationInstance soapBindingAnnot =
+                    AnnotationUtil.getAnnotation(methodDecl.getDeclaringType(), SOAPBinding.class.getName());
 
                 /* handle document services */
 
                 /* prevent non-header OUT or INOUT parameters -- [1], 4.4.1 */
-                if(isDocumentStyle) {
-                    if(webParam != null && !webParam.header() && (webParam.mode() == WebParam.Mode.INOUT || webParam.mode() == WebParam.Mode.OUT))
-                        _messager.printError("Document style operation \"" + methodDecl.getSimpleName() + "\" can not use a non-header " + webParam.mode().toString() + " parameter.");
+                String mode = AnnotationUtil.getEnumValue(webParam, "mode");
+                Boolean isHeader = AnnotationUtil.getBooleanValue(webParam, "header");
+                if(style == SOAPBinding.Style.DOCUMENT) {
+                    if(webParam != null &&
+                       (isHeader != null && !isHeader.booleanValue()) &&
+                       (WebParam.Mode.INOUT.toString().equals(mode) || WebParam.Mode.OUT.toString().equals(mode)))
+                        _messager.printError("Document style operation \"" + methodDecl.getSimpleName() + "\" can not use a non-header " + mode + " parameter.");
                 }
                 /* handle RPC services */
                 else {
@@ -352,17 +388,18 @@
             inputStream = wsdlLocation.openStream();
             InputSource inputSource = new InputSource(inputStream);
 
-            WebService wsAnnot = typeDeclaration.getAnnotation(WebService.class);
-            String name = wsAnnot.name();
+            AnnotationInstance annotationInstance =
+                AnnotationUtil.getAnnotation(typeDeclaration, WebService.class.getName());
+
+            String name = AnnotationUtil.getStringValue(annotationInstance, "name");
             if (name.equals(""))
                 name = typeDeclaration.getSimpleName();
 
             Definition definition = wsdlReader.readWSDL(null, inputSource);
-            String targetNamespace = wsAnnot.targetNamespace();
-            if (targetNamespace.equals("")) {
+            String targetNamespace = AnnotationUtil.getStringValue(annotationInstance, "targetNamespace");
+            if (targetNamespace.equals(""))
                 targetNamespace = definition.getTargetNamespace();
-            }
-            
+
             PortType portType = definition.getPortType(new QName(targetNamespace, name));
 
             if(portType == null)
@@ -372,14 +409,15 @@
                 Load the methods from the TypeDeclaration that are annotated with @WebMethod.
                 This makes mapping web methods to WSDL operations simpler below
                  */
-                Collection<? extends MethodDeclaration> methods = typeDeclaration.getMethods();
                 HashMap wmMap = new HashMap();
-                Iterator iterator = methods.iterator();
-                while(iterator.hasNext()) {
-                    MethodDeclaration md = (MethodDeclaration)iterator.next();
-                    WebMethod wmAnnot = md.getAnnotation(WebMethod.class);
+                MethodDeclaration[] methods = typeDeclaration.getMethods();
+                for(int i = 0; i < methods.length; i++) {
+                    MethodDeclaration md = methods[i];
+                    AnnotationInstance wmAnnot = AnnotationUtil.getAnnotation(md, WebMethod.class.getName());
+
+                    String operationName = AnnotationUtil.getStringValue(wmAnnot, "operationName");
                     if(wmAnnot != null)
-                        wmMap.put(!wmAnnot.operationName().equals("") ? wmAnnot.operationName() : md.getSimpleName(), md);
+                        wmMap.put(!operationName.equals("") ? operationName : md.getSimpleName(), md);
                 }
 
                 /*
@@ -397,7 +435,8 @@
                     }
 
                     /* check @Oneway */
-                    if(md.getAnnotation(Oneway.class) != null && operation.getOutput() != null)
+                    AnnotationInstance oneway = AnnotationUtil.getAnnotation(md, Oneway.class.getName());
+                    if(oneway != null && operation.getOutput() != null)
                         _messager.printError("Web service method is specified as @Oneway but the WSDL specifies outputs");
 
                     /* todo: JAX-RPC 1.1 section 5.5.5 mapping rules */

Modified: beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/WsmResourceGenerator.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/WsmResourceGenerator.java?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/WsmResourceGenerator.java (original)
+++ beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/WsmResourceGenerator.java Wed Jul  5 06:16:53 2006
@@ -17,8 +17,8 @@
  */
 package org.apache.beehive.wsm.processor.generator;
 
-import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.declaration.TypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.TypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.env.CoreAnnotationProcessorEnv;
 
 /**
  *
@@ -29,5 +29,5 @@
     serviceEndpoint interface generation should be performed in implementations of this base class
     depending on the service's target execution environment
     */
-    public abstract void generate(AnnotationProcessorEnvironment env, TypeDeclaration typeDeclaration);
+    public abstract void generate(CoreAnnotationProcessorEnv env, TypeDeclaration typeDeclaration);
 }

Modified: beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java (original)
+++ beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/generator/axis/AxisGenerator.java Wed Jul  5 06:16:53 2006
@@ -21,10 +21,6 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 
-import com.sun.mirror.declaration.TypeDeclaration;
-import com.sun.mirror.util.SourcePosition;
-import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.apt.Filer;
 import org.apache.beehive.wsm.model.WsmService;
 import org.apache.beehive.wsm.processor.model.factory.WsmServiceStyleFactory;
 import org.apache.beehive.wsm.processor.model.factory.WsmServiceFactory;
@@ -33,6 +29,10 @@
 import org.apache.beehive.wsm.processor.generator.WsmResourceGenerator;
 import org.apache.beehive.wsm.util.WsmddUtils;
 import org.apache.beehive.wsm.exception.CodeGenerationException;
+import org.apache.beehive.common.glass.typesystem.env.CoreAnnotationProcessorEnv;
+import org.apache.beehive.common.glass.typesystem.env.Filer;
+import org.apache.beehive.common.glass.typesystem.declaration.TypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.util.SourcePosition;
 
 public class AxisGenerator
     extends WsmResourceGenerator {
@@ -44,7 +44,7 @@
     private AxisGenerator() {
     }
 
-    public void generate(AnnotationProcessorEnvironment env, TypeDeclaration typeDecl) {
+    public void generate(CoreAnnotationProcessorEnv env, TypeDeclaration typeDecl) {
 
         WsmServiceFactory factory =
             WsmServiceStyleFactory.create(WsmServiceStyleFactory.FactoryType.MIRROR);
@@ -74,7 +74,8 @@
         PrintWriter printWriter = null;
         try {
             Filer filer = env.getFiler();
-            printWriter = filer.createTextFile(Filer.Location.CLASS_TREE, packageName, new File(fileName), null);
+            //printWriter = filer.createTextFile(Filer.Location.CLASS_TREE, packageName, new File(fileName), null);
+            printWriter = filer.createTextFile(new File(packageName.replaceAll("\\.", "/") + "/" + fileName));
 
             WsmddUtils.write(wsmService, printWriter);
             printWriter.close();

Modified: beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorTypeResolver.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorTypeResolver.java?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorTypeResolver.java (original)
+++ beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorTypeResolver.java Wed Jul  5 06:16:53 2006
@@ -17,8 +17,8 @@
  */
 package org.apache.beehive.wsm.processor.model.factory.mirror;
 
-import com.sun.mirror.apt.AnnotationProcessorEnvironment;
 import org.apache.beehive.wsm.processor.model.factory.TypeResolver;
+import org.apache.beehive.common.glass.typesystem.env.CoreAnnotationProcessorEnv;
 
 /**
  * A resolver that maps a String to some representation of a type declaration.  Depending
@@ -29,13 +29,13 @@
 public class MirrorTypeResolver
     extends TypeResolver {
 
-    public static MirrorTypeResolver getInstance(AnnotationProcessorEnvironment env) {
+    public static MirrorTypeResolver getInstance(CoreAnnotationProcessorEnv env) {
         return new MirrorTypeResolver(env);
     }
 
-    private AnnotationProcessorEnvironment _env;
+    private CoreAnnotationProcessorEnv _env;
 
-    private MirrorTypeResolver(AnnotationProcessorEnvironment env) {
+    private MirrorTypeResolver(CoreAnnotationProcessorEnv env) {
         _env = env;
     }
 

Modified: beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorWsmServiceFactory.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorWsmServiceFactory.java?rev=419224&r1=419223&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorWsmServiceFactory.java (original)
+++ beehive/wsm/trunk/src/core/org/apache/beehive/wsm/processor/model/factory/mirror/MirrorWsmServiceFactory.java Wed Jul  5 06:16:53 2006
@@ -22,7 +22,6 @@
 import java.io.IOException;
 import java.net.URL;
 import java.net.MalformedURLException;
-import java.util.Iterator;
 import java.util.List;
 import javax.jws.WebService;
 import javax.jws.WebMethod;
@@ -35,11 +34,6 @@
 import javax.jws.soap.SOAPMessageHandlers;
 import javax.jws.soap.InitParam;
 
-import com.sun.mirror.declaration.TypeDeclaration;
-import com.sun.mirror.declaration.MethodDeclaration;
-import com.sun.mirror.declaration.ParameterDeclaration;
-import com.sun.mirror.declaration.Modifier;
-
 import org.apache.beehive.wsm.processor.model.factory.WsmServiceFactory;
 import org.apache.beehive.wsm.processor.model.factory.TypeResolver;
 import org.apache.beehive.wsm.model.WsmService;
@@ -50,6 +44,12 @@
 import org.apache.beehive.wsm.exception.Jsr181ValidationException;
 import org.apache.beehive.wsm.exception.IllegalHandlerConfigException;
 import org.apache.beehive.wsm.util.HandlerChainParser;
+import org.apache.beehive.common.glass.typesystem.declaration.TypeDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.MethodDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.Modifier;
+import org.apache.beehive.common.glass.typesystem.declaration.ParameterDeclaration;
+import org.apache.beehive.common.glass.typesystem.declaration.AnnotationInstance;
+import org.apache.beehive.common.glass.typesystem.util.AnnotationUtil;
 
 /**
  * This class is used to create a {@link WsmService} object model given
@@ -78,15 +78,17 @@
         TypeDeclaration implDecl = (TypeDeclaration)typeResolver.resolveType(serviceBeanClassName);
 
         TypeDeclaration endpointDecl = null;
-        WebService webService = implDecl.getAnnotation(WebService.class);
-        if(webService.endpointInterface() != null && !webService.endpointInterface().equals(""))
-            endpointDecl = (TypeDeclaration)typeResolver.resolveType(webService.endpointInterface());
+
+        AnnotationInstance webService = AnnotationUtil.getAnnotation(implDecl, WebService.class.getName());
+        String endpointInterface = AnnotationUtil.getStringValue(webService, "endpointInterface");
+        if(endpointInterface != null && !endpointInterface.equals(""))
+            endpointDecl = (TypeDeclaration)typeResolver.resolveType(endpointInterface);
 
         /* class-level annotations */
         if(endpointDecl != null) {
             processClass(wsMetadata, endpointDecl, baseLocation);
 
-            String serviceName = implDecl.getAnnotation(WebService.class).serviceName();
+            String serviceName = AnnotationUtil.getStringValue(webService, "serviceName");
             if(serviceName == null || serviceName.trim().length() == 0)
                 wsMetadata.setServiceName(implDecl.getSimpleName() + SERVICE_SUFFIX);
             else wsMetadata.setServiceName(serviceName);
@@ -105,9 +107,11 @@
             processClass(wsMetadata, implDecl, baseLocation);
 
             boolean allWebMethods = true;
-            for(MethodDeclaration method: implDecl.getMethods())
-                if(method.getAnnotation(WebMethod.class) != null)
+            for(MethodDeclaration method: implDecl.getMethods()) {
+                AnnotationInstance webMethod = AnnotationUtil.getAnnotation(method, WebMethod.class.getName());
+                if(webMethod != null)
                     allWebMethods = false;
+            }
 
             /* process the @WebMethods */
             for(MethodDeclaration method : implDecl.getMethods()) {
@@ -116,9 +120,11 @@
                 except those matching method names / signatures matching those inherited from
                 java.lang.Object are exposed as @WebMethods
                 */
+                AnnotationInstance webMethod = AnnotationUtil.getAnnotation(method, WebMethod.class.getName());
+
                 if(allWebMethods && acceptWebMethod(method, typeResolver))
                     processMethod(wsMetadata, method);
-                else if(method.getAnnotation(WebMethod.class) != null)
+                else if(webMethod != null)
                     processMethod(wsMetadata, method);
             }
         }
@@ -127,21 +133,24 @@
     }
 
     private void processClass(WsmService wsMetadata, TypeDeclaration typeDecl, String baseLocation) {
-        WebService ws = typeDecl.getAnnotation(WebService.class);
+        AnnotationInstance ws = AnnotationUtil.getAnnotation(typeDecl, WebService.class.getName());
 
         wsMetadata.setServiceClassName(typeDecl.getQualifiedName());
 
-        if(ws.name().trim().length() == 0)
+        String name = AnnotationUtil.getStringValue(ws, "name");
+        if(name.trim().length() == 0)
             wsMetadata.setName(typeDecl.getSimpleName());
-        else wsMetadata.setName(ws.name());
+        else wsMetadata.setName(name);
 
-        if(ws.serviceName().trim().length() == 0)
+        String serviceName = AnnotationUtil.getStringValue(ws, "serviceName");
+        if(serviceName.trim().length() == 0)
             wsMetadata.setServiceName(typeDecl.getSimpleName() + SERVICE_SUFFIX);
-        else wsMetadata.setServiceName(ws.serviceName());
+        else wsMetadata.setServiceName(serviceName);
 
-        if(ws.targetNamespace() == null || ws.targetNamespace().length() == 0)
+        String targetNamespace = AnnotationUtil.getStringValue(ws, "targetNamespace");
+        if(targetNamespace == null || targetNamespace.length() == 0)
             wsMetadata.setTargetNamespace(computeTargetNamespace(typeDecl.getQualifiedName()));
-        else wsMetadata.setTargetNamespace(ws.targetNamespace());
+        else wsMetadata.setTargetNamespace(targetNamespace);
 
         /* assume that the wsdlLocation annotation has already been validated */
         // todo: this JavaBean property doesn't seem like it's needed */
@@ -149,20 +158,42 @@
         //wsMetadata.setWsEndpointInterface(ws.endpointInterface());
 
         /* annot: SOAPBinding.class */
-        SOAPBinding soapBinding = typeDecl.getAnnotation(SOAPBinding.class);
+        AnnotationInstance soapBinding = AnnotationUtil.getAnnotation(typeDecl, SOAPBinding.class.getName());
         if(soapBinding != null) {
             WsmSoapBinding soapBindingInfo = new WsmSoapBinding();
-            soapBindingInfo.setStyle(soapBinding.style());
-            soapBindingInfo.setUse(soapBinding.use());
-            soapBindingInfo.setParameterStyle(soapBinding.parameterStyle());
+
+            SOAPBinding.Style style = null;
+            String styleStr = AnnotationUtil.getStringValue(soapBinding, "style");
+            if(styleStr == null || styleStr.equals("") || SOAPBinding.Style.DOCUMENT.toString().equals(styleStr))
+                style = SOAPBinding.Style.DOCUMENT;
+            else style = SOAPBinding.Style.RPC;
+            soapBindingInfo.setStyle(style);
+
+            SOAPBinding.ParameterStyle parameterStyle = null;
+            String paramStyleStr = AnnotationUtil.getStringValue(soapBinding, "parameterStyle");
+            if(SOAPBinding.ParameterStyle.BARE.toString().equals(paramStyleStr))
+                parameterStyle = SOAPBinding.ParameterStyle.BARE;
+            else parameterStyle = SOAPBinding.ParameterStyle.WRAPPED;
+            soapBindingInfo.setParameterStyle(parameterStyle);
+
+            SOAPBinding.Use use = null;
+            String useStr = AnnotationUtil.getStringValue(soapBinding, "parameterStyle");
+            if(SOAPBinding.Use.ENCODED.toString().equals(useStr))
+                use = SOAPBinding.Use.ENCODED;
+            else use = SOAPBinding.Use.LITERAL;
+            soapBindingInfo.setUse(use);
+
             wsMetadata.setSoapBinding(soapBindingInfo);
         }
 
         /* annot: SOAPMessageHandlers.class */
-        /* todo: in the presence of both an endpoint interface and service implementation bean with a @SOAPMessageHandler
-                 interface, the implementation's version wins */
-        SOAPMessageHandlers soapMessageHandlers = typeDecl.getAnnotation(SOAPMessageHandlers.class);
+        /* todo: in the presence of both an endpoint interface and service implementation
+                 bean with a @SOAPMessageHandler interface, the implementation's version wins
+         */
+/*
+        AnnotationInstance soapMessageHandlers = AnnotationUtil.getAnnotation(typeDecl, SOAPMessageHandlers.class.getName());
         if(soapMessageHandlers != null) {
+
             for(SOAPMessageHandler soapMessageHandlerAnnot : soapMessageHandlers.value()) {
                 WsmSoapMessageHandler soapMessageHandlerInfo = new WsmSoapMessageHandler();
 
@@ -186,11 +217,12 @@
                 wsMetadata.addSoapHandler(soapMessageHandlerInfo);
             }
         }
+*/
 
         /* annot: HandlerChain.class */
         /* todo: in the presence of both an endpoint interface and service implementation bean with a @HandlerChain
                  interface, the implementation's version wins */
-        HandlerChain handlerChain = typeDecl.getAnnotation(HandlerChain.class);
+        AnnotationInstance handlerChain = AnnotationUtil.getAnnotation(typeDecl, HandlerChain.class.getName());
         if(handlerChain != null)
             configureHandlerChain(handlerChain, wsMetadata, baseLocation);
     }
@@ -199,32 +231,31 @@
         if(!methodDecl.getModifiers().contains(Modifier.PUBLIC))
             return;
 
-        WebMethod webMethod = methodDecl.getAnnotation(WebMethod.class);
-        String methodName = methodDecl.getSimpleName();
-
         WsmOperation wsMethod = new WsmOperation();
         wsMethod.setJavaReturnType(methodDecl.getReturnType().toString());
-        wsMethod.setJavaMethodName(methodName);
+        wsMethod.setJavaMethodName(methodDecl.getSimpleName());
         wsMethod.setName(DEFAULT_WR_NAME);
 
-        WebResult webResult = methodDecl.getAnnotation(WebResult.class);
+        AnnotationInstance webResult = AnnotationUtil.getAnnotation(methodDecl, WebResult.class.getName());
         if(webResult != null) {
-            wsMethod.setName(webResult.name());
-            wsMethod.setTargetNamespace(webResult.targetNamespace());
+            String name = AnnotationUtil.getStringValue(webResult, "name");
+            wsMethod.setName(!"".equals(name) ? name : DEFAULT_WR_NAME);
+            wsMethod.setTargetNamespace(AnnotationUtil.getStringValue(webResult, "targetNamespace"));
         }
 
-        Oneway oneway = methodDecl.getAnnotation(Oneway.class);
+        AnnotationInstance oneway = AnnotationUtil.getAnnotation(methodDecl, Oneway.class.getName());
         if(oneway != null) {
             wsMethod.setOneWay(true);
         }
 
+        AnnotationInstance webMethod = AnnotationUtil.getAnnotation(methodDecl, WebMethod.class.getName());
         if(webMethod != null) {
-            wsMethod.setAction(webMethod.action());
-            wsMethod.setOperationName(webMethod.operationName());
+            wsMethod.setAction(AnnotationUtil.getStringValue(webMethod, "action"));
+            wsMethod.setOperationName(AnnotationUtil.getStringValue(webMethod, "operationName"));
         }
 
         if(wsMethod.getOperationName() == null || wsMethod.getOperationName().length() == 0)
-            wsMethod.setOperationName(methodName);
+            wsMethod.setOperationName(methodDecl.getSimpleName());
 
         if(wsMethod.getAction() == null || wsMethod.getAction().length() == 0)
             wsMethod.setAction("");
@@ -244,13 +275,26 @@
             wsParam.setName(paramDecl.getSimpleName());
             wsParam.setMode(WebParam.Mode.IN);
 
-            WebParam webParam = paramDecl.getAnnotation(WebParam.class);
+            AnnotationInstance webParam = AnnotationUtil.getAnnotation(paramDecl, WebParam.class.getName());
             if(webParam != null) {
-                if(!webParam.name().equals(""))
-                    wsParam.setName(webParam.name());
-                wsParam.setTargetNamespace(webParam.targetNamespace());
-                wsParam.setMode(webParam.mode());
-                wsParam.setHeader(webParam.header());
+
+                String name = AnnotationUtil.getStringValue(webParam, "name");
+                if(!"".equals(name))
+                    wsParam.setName(name);
+
+                wsParam.setTargetNamespace(AnnotationUtil.getStringValue(webParam, "targetNamespace"));
+
+                String modeStr = AnnotationUtil.getStringValue(webParam, "mode");
+                WebParam.Mode mode = null;
+                if(WebParam.Mode.OUT.toString().equals(modeStr))
+                    mode = WebParam.Mode.OUT;
+                else if(WebParam.Mode.INOUT.toString().equals(modeStr))
+                    mode = WebParam.Mode.INOUT;
+                else mode = WebParam.Mode.IN;
+                wsParam.setMode(mode);
+
+                Boolean header = AnnotationUtil.getBooleanValue(webParam, "header");
+                wsParam.setHeader(header != null ? header.booleanValue() : false);
             }
 
             String wpTargetNamespace = wsParam.getTargetNamespace();
@@ -268,7 +312,7 @@
      * @throws IllegalHandlerConfigException when the given file does not exist, is invalid, or some other runtime error occurs
      *                                       during processing.
      */
-    private void configureHandlerChain(HandlerChain handlerChain, WsmService wsMetadata, String baseLocation) {
+    private void configureHandlerChain(AnnotationInstance handlerChain, WsmService wsMetadata, String baseLocation) {
         /*
         todo: need to figure out if URLs are the right thing to use here.  the spec says
         that URLs are relative (at the time of processing) or absolute.  how does
@@ -277,8 +321,8 @@
         at runtime?
          */
 
-        String handlerChainFile = handlerChain.file();
-        String chainName = handlerChain.name();
+        String handlerChainFile = AnnotationUtil.getStringValue(handlerChain, "file");
+        String chainName = AnnotationUtil.getStringValue(handlerChain, "name");
 
         URL chainConfigURL = findResource(baseLocation, handlerChainFile);
         if(null == chainConfigURL)
@@ -353,9 +397,9 @@
     private boolean acceptWebMethod(MethodDeclaration webMethod, TypeResolver typeResolver) {
         TypeDeclaration objectDecl = (TypeDeclaration)typeResolver.resolveType("java.lang.Object");
 
-        Iterator objectMethodsIterator = objectDecl.getMethods().iterator();
-        while(objectMethodsIterator.hasNext()) {
-            MethodDeclaration objectMethod = (MethodDeclaration)objectMethodsIterator.next();
+        MethodDeclaration[] methods = objectDecl.getMethods();
+        for(int i = 0; i < methods.length; i++) {
+            MethodDeclaration objectMethod = methods[i];
             if(objectMethod.getSimpleName().equals(webMethod.getSimpleName()))
                 return false;
         }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/TypesystemElement.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/TypesystemElement.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/TypesystemElement.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/TypesystemElement.java Wed Jul  5 06:16:53 2006
@@ -15,8 +15,7 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem;
+package org.apache.beehive.common.glass.typesystem;
 
-public interface TypesystemElement
-{
+public interface TypesystemElement {
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationInstance.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationInstance.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationInstance.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationInstance.java Wed Jul  5 06:16:53 2006
@@ -15,23 +15,22 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
-
-import org.apache.beehive.netui.compiler.typesystem.type.AnnotationType;
-import org.apache.beehive.netui.compiler.typesystem.util.SourcePosition;
-import org.apache.beehive.netui.compiler.typesystem.TypesystemElement;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
 import java.util.Map;
 
+import org.apache.beehive.common.glass.typesystem.TypesystemElement;
+import org.apache.beehive.common.glass.typesystem.type.AnnotationType;
+import org.apache.beehive.common.glass.typesystem.util.SourcePosition;
+
 public interface AnnotationInstance
-        extends TypesystemElement
-{
+    extends TypesystemElement {
     AnnotationType getAnnotationType();
-    
+
     SourcePosition getPosition();
-    
+
     // Map<AnnotationTypeElementDeclaration, AnnotationValue> getElementValues();
     Map getElementValues();
-    
+
     TypeDeclaration getContainingType();
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,12 +15,11 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
 public interface AnnotationTypeDeclaration
-        extends InterfaceDeclaration
-{
+    extends InterfaceDeclaration {
     AnnotationTypeElementDeclaration[] getAnnotationMembers();
-    
-    public AnnotationTypeElementDeclaration getMember( String name );
+
+    public AnnotationTypeElementDeclaration getMember(String name);
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeElementDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeElementDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeElementDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationTypeElementDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,11 +15,10 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
 public interface AnnotationTypeElementDeclaration
-        extends MethodDeclaration
-{
+    extends MethodDeclaration {
     AnnotationValue getDefaultValue();
 
     // --Commented out by Inspection (3/13/05 4:41 PM): AnnotationTypeDeclaration getDeclaringAnnotationType();

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationValue.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationValue.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationValue.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/AnnotationValue.java Wed Jul  5 06:16:53 2006
@@ -15,13 +15,14 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-public interface AnnotationValue
-{
+import org.apache.beehive.common.glass.typesystem.util.SourcePosition;
+
+public interface AnnotationValue {
     Object getValue();
 
-    org.apache.beehive.netui.compiler.typesystem.util.SourcePosition getPosition();
+    SourcePosition getPosition();
 
     String toString();
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ClassDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ClassDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ClassDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ClassDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,13 +15,13 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-import org.apache.beehive.netui.compiler.typesystem.type.ClassType;
+import org.apache.beehive.common.glass.typesystem.type.ClassType;
 
 public interface ClassDeclaration
-        extends TypeDeclaration
-{
+    extends TypeDeclaration {
+
     ClassType getSuperclass();
 
     ConstructorDeclaration[] getConstructors();

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ConstructorDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ConstructorDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ConstructorDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ConstructorDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,9 +15,8 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
 public interface ConstructorDeclaration
-        extends ExecutableDeclaration
-{
+    extends ExecutableDeclaration {
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Declaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Declaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Declaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Declaration.java Wed Jul  5 06:16:53 2006
@@ -15,17 +15,16 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
-
-import org.apache.beehive.netui.compiler.typesystem.util.SourcePosition;
-import org.apache.beehive.netui.compiler.typesystem.TypesystemElement;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
 import java.util.Set;
 
+import org.apache.beehive.common.glass.typesystem.TypesystemElement;
+import org.apache.beehive.common.glass.typesystem.util.SourcePosition;
+
 public interface Declaration
-        extends TypesystemElement
-{
-    boolean equals( Object o );
+    extends TypesystemElement {
+    boolean equals(Object o);
 
     // --Commented out by Inspection (3/13/05 4:42 PM): String getDocComment();
 
@@ -33,14 +32,14 @@
 
     //<A extends Annotation> A getAnnotation( Class<A> aClass );
 
-    /** Set of Modifier */
-    Set getModifiers();
+    // Set of Modifiers
+    Set  getModifiers();
 
     String getSimpleName();
 
-    org.apache.beehive.netui.compiler.typesystem.util.SourcePosition getPosition();
+    SourcePosition getPosition();
 
     //void accept( DeclarationVisitor declarationVisitor );
-    
-    boolean hasModifier( Modifier modifier );
+
+    boolean hasModifier(Modifier modifier);
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ExecutableDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ExecutableDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ExecutableDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ExecutableDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,13 +15,10 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
-
-import org.apache.beehive.netui.compiler.typesystem.type.ReferenceType;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
 public interface ExecutableDeclaration
-        extends MemberDeclaration
-{
+    extends MemberDeclaration {
     // --Commented out by Inspection (3/13/05 4:42 PM): boolean isVarArgs();
 
     //TypeParameterDeclaration[] getFormalTypeParameters();

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/FieldDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/FieldDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/FieldDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/FieldDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,13 +15,12 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance;
+import org.apache.beehive.common.glass.typesystem.type.TypeInstance;
 
 public interface FieldDeclaration
-        extends MemberDeclaration
-{
+    extends MemberDeclaration {
     TypeInstance getType();
 
     // --Commented out by Inspection (3/13/05 4:42 PM): Object getConstantValue();

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/InterfaceDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/InterfaceDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/InterfaceDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/InterfaceDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,9 +15,8 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-public interface InterfaceDeclaration 
-        extends TypeDeclaration
-{
+public interface InterfaceDeclaration
+    extends TypeDeclaration {
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MemberDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MemberDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MemberDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MemberDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,10 +15,10 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
 public interface MemberDeclaration
-        extends Declaration
-{
+    extends Declaration {
+
     TypeDeclaration getDeclaringType();
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MethodDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MethodDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MethodDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/MethodDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,12 +15,11 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance;
+import org.apache.beehive.common.glass.typesystem.type.TypeInstance;
 
-public interface MethodDeclaration 
-        extends ExecutableDeclaration
-{
-     TypeInstance getReturnType();
+public interface MethodDeclaration
+    extends ExecutableDeclaration {
+    TypeInstance getReturnType();
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Modifier.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Modifier.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Modifier.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/Modifier.java Wed Jul  5 06:16:53 2006
@@ -15,10 +15,9 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-public class Modifier
-{
+public class Modifier {
     protected static final int INT_ABSTRACT = 0;
     protected static final int INT_PRIVATE = 1;
     protected static final int INT_PROTECTED = 2;
@@ -28,63 +27,65 @@
     protected static final int INT_FINAL = 6;
     protected static final int INT_SYNCHRONIZED = 7;
     protected static final int INT_NATIVE = 8;
-    
-    public static final Modifier ABSTRACT = new Modifier( INT_ABSTRACT );
-    public static final Modifier PRIVATE = new Modifier( INT_PRIVATE );
-    public static final Modifier PROTECTED = new Modifier( INT_PROTECTED );
-    public static final Modifier PUBLIC = new Modifier( INT_PUBLIC );
-    public static final Modifier STATIC = new Modifier( INT_STATIC );
-    public static final Modifier TRANSIENT = new Modifier( INT_TRANSIENT );
-    public static final Modifier FINAL = new Modifier( INT_FINAL );
-    public static final Modifier SYNCHRONIZED = new Modifier( INT_SYNCHRONIZED );
-    public static final Modifier NATIVE = new Modifier( INT_NATIVE );
+
+    public static final Modifier ABSTRACT = new Modifier(INT_ABSTRACT);
+    public static final Modifier PRIVATE = new Modifier(INT_PRIVATE);
+    public static final Modifier PROTECTED = new Modifier(INT_PROTECTED);
+    public static final Modifier PUBLIC = new Modifier(INT_PUBLIC);
+    public static final Modifier STATIC = new Modifier(INT_STATIC);
+    public static final Modifier TRANSIENT = new Modifier(INT_TRANSIENT);
+    public static final Modifier FINAL = new Modifier(INT_FINAL);
+    public static final Modifier SYNCHRONIZED = new Modifier(INT_SYNCHRONIZED);
+    public static final Modifier NATIVE = new Modifier(INT_NATIVE);
 
     private int _val;
 
-    private Modifier( int val )
-    {
+    private Modifier(int val) {
         _val = val;
     }
 
-    public String toString()
-    {
-        switch ( _val )
-        {
-            case INT_ABSTRACT: return "abstract";
-            case INT_PRIVATE: return "private";
-            case INT_PROTECTED: return "protected";
-            case INT_PUBLIC: return "public";
-            case INT_STATIC: return "static";
-            case INT_TRANSIENT: return "transient";
-            case INT_FINAL: return "final";
-            case INT_SYNCHRONIZED: return "synchronized";
-            case INT_NATIVE: return "native";
+    public String toString() {
+        switch (_val) {
+            case INT_ABSTRACT:
+                return "abstract";
+            case INT_PRIVATE:
+                return "private";
+            case INT_PROTECTED:
+                return "protected";
+            case INT_PUBLIC:
+                return "public";
+            case INT_STATIC:
+                return "static";
+            case INT_TRANSIENT:
+                return "transient";
+            case INT_FINAL:
+                return "final";
+            case INT_SYNCHRONIZED:
+                return "synchronized";
+            case INT_NATIVE:
+                return "native";
         }
-        
+
         assert false : _val;
         return "<unknown Modifier>";
     }
-    
-    public boolean equals( Object o )
-    {
-        if ( o == null ) return false;
-        if ( o == this ) return true;
-        if ( ! ( o instanceof Modifier ) ) return false;
-        return ( ( Modifier ) o )._val == _val;
+
+    public boolean equals(Object o) {
+        if (o == null) return false;
+        if (o == this) return true;
+        if (!(o instanceof Modifier)) return false;
+        return ((Modifier) o)._val == _val;
     }
-    
-    public int hashCode()
-    {
+
+    public int hashCode() {
         return _val;
     }
-    
-    protected Modifier()
-    {
+
+    protected Modifier() {
         _val = -1;
     }
-    
-    protected void setVal( int val )
-    {
+
+    protected void setVal(int val) {
         _val = val;
     }
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/PackageDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/PackageDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/PackageDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/PackageDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,10 +15,9 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-public interface PackageDeclaration
-{
+public interface PackageDeclaration {
     String getQualifiedName();
 
     ClassDeclaration[] getClasses();

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ParameterDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ParameterDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ParameterDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/ParameterDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,12 +15,11 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance;
+import org.apache.beehive.common.glass.typesystem.type.TypeInstance;
 
-public interface ParameterDeclaration 
-        extends Declaration
-{
+public interface ParameterDeclaration
+    extends Declaration {
     TypeInstance getType();
 }

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,13 +15,13 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-import org.apache.beehive.netui.compiler.typesystem.type.InterfaceType;
+import org.apache.beehive.common.glass.typesystem.type.InterfaceType;
 
 public interface TypeDeclaration
-        extends MemberDeclaration
-{
+    extends MemberDeclaration {
+
     PackageDeclaration getPackage();
 
     String getQualifiedName();

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeParameterDeclaration.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeParameterDeclaration.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeParameterDeclaration.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/declaration/TypeParameterDeclaration.java Wed Jul  5 06:16:53 2006
@@ -15,13 +15,12 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.declaration;
+package org.apache.beehive.common.glass.typesystem.declaration;
 
-import org.apache.beehive.netui.compiler.typesystem.type.ReferenceType;
+import org.apache.beehive.common.glass.typesystem.type.ReferenceType;
 
 public interface TypeParameterDeclaration
-        extends Declaration
-{
+    extends Declaration {
     ReferenceType[] getBounds();
 
     // --Commented out by Inspection (3/13/05 4:43 PM): Declaration getOwner();

Modified: beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/env/CoreAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/env/CoreAnnotationProcessor.java?rev=419224&r1=413523&r2=419224&view=diff
==============================================================================
--- beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/env/CoreAnnotationProcessor.java (original)
+++ beehive/wsm/trunk/src/glass/org/apache/beehive/common/glass/typesystem/env/CoreAnnotationProcessor.java Wed Jul  5 06:16:53 2006
@@ -15,12 +15,11 @@
  *
  * $Header:$
  */
-package org.apache.beehive.netui.compiler.typesystem.env;
+package org.apache.beehive.common.glass.typesystem.env;
 
 /**
  * Annotation processor; "core" to differentiate from Sun's <code>AnnotationProcessor</code>.
  */
-public interface CoreAnnotationProcessor
-{
+public interface CoreAnnotationProcessor {
     void process();
 }