Package: plexus-component-metadata / 1.0~beta3.0.7-5

qdox1_9.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Description: Fix build with Debian QDox version
 Updated patch for QDox 1.9.2 as JavaDocBuilder doesn't
 implement javaCache any longer.
 <http://jira.codehaus.org/browse/QDOX-148>
Author: Ludovic Claude <ludovic.claude@laposte.net>
Author: Damien Raude-Morvan <drazzib@debian.org>
Last-Update: 2009-10-19
--- a/src/main/java/org/codehaus/plexus/metadata/gleaner/QDoxComponentGleaner.java
+++ b/src/main/java/org/codehaus/plexus/metadata/gleaner/QDoxComponentGleaner.java
@@ -47,8 +47,8 @@
 
 import com.thoughtworks.qdox.model.DocletTag;
 import com.thoughtworks.qdox.model.JavaClass;
-import com.thoughtworks.qdox.model.JavaClassCache;
 import com.thoughtworks.qdox.model.JavaField;
+import com.thoughtworks.qdox.JavaDocBuilder;
 
 /**
  * A source component gleaner which uses QDox to discover Javadoc annotations.
@@ -88,7 +88,7 @@
     // ComponentGleaner Implementation
     // ----------------------------------------------------------------------
 
-    public ComponentDescriptor<?> glean( JavaClassCache classCache, JavaClass javaClass )
+    public ComponentDescriptor<?> glean( JavaDocBuilder classCache, JavaClass javaClass )
         throws ComponentGleanerException
     {
         DocletTag tag = javaClass.getTagByName( PLEXUS_COMPONENT_TAG );
@@ -268,7 +268,7 @@
 
             String fqn = ifc.getFullyQualifiedName();
 
-            String pkg = ifc.getPackage();
+            String pkg = ifc.getPackage().getName();
 
             if ( pkg == null )
             {
@@ -286,7 +286,7 @@
                     // prepend the gleaned class' package
                     // -----------------------------------------------------------------------
 
-                    pkg = javaClass.getPackage();
+                    pkg = javaClass.getPackage().getName();
 
                     fqn = pkg + "." + fqn;
                 }
@@ -330,7 +330,7 @@
         return role;
     }
 
-    private void findRequirements( JavaClassCache classCache, ComponentDescriptor<?> componentDescriptor,
+    private void findRequirements( JavaDocBuilder classCache, ComponentDescriptor<?> componentDescriptor,
                                    JavaClass javaClass )
     {
         JavaField[] fields = javaClass.getFields();
@@ -444,9 +444,9 @@
 
                 JavaClass roleClass = classCache.getClassByName( role );
 
-                if ( role.indexOf( '.' ) == -1 && StringUtils.isEmpty( roleClass.getPackage() ) )
+                if ( role.indexOf( '.' ) == -1 && StringUtils.isEmpty( roleClass.getPackage().getName() ) )
                 {
-                    role = javaClass.getPackage() + "." + roleClass.getName();
+                    role = javaClass.getPackage().getName() + "." + roleClass.getName();
                 }
 
                 cr.setRole( role );
@@ -547,4 +547,4 @@
 
         return value;
     }
-}
\ No newline at end of file
+}
--- a/src/main/java/org/codehaus/plexus/metadata/gleaner/SourceComponentGleaner.java
+++ b/src/main/java/org/codehaus/plexus/metadata/gleaner/SourceComponentGleaner.java
@@ -19,7 +19,7 @@
 import org.codehaus.plexus.component.repository.ComponentDescriptor;
 
 import com.thoughtworks.qdox.model.JavaClass;
-import com.thoughtworks.qdox.model.JavaClassCache;
+import com.thoughtworks.qdox.JavaDocBuilder;
 
 /**
  * Interface for component gleaners which glean off of source code.
@@ -30,6 +30,6 @@
 {
     String ROLE = SourceComponentGleaner.class.getName();
 
-    ComponentDescriptor<?> glean(JavaClassCache classCache, JavaClass javaClass) 
+    ComponentDescriptor<?> glean(JavaDocBuilder classCache, JavaClass javaClass) 
         throws ComponentGleanerException;
-}
\ No newline at end of file
+}