You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2012/07/03 19:38:48 UTC

svn commit: r1356844 - /felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java

Author: cziegeler
Date: Tue Jul  3 17:38:47 2012
New Revision: 1356844

URL: http://svn.apache.org/viewvc?rev=1356844&view=rev
Log:
FELIX-3550 : Reimplement the SCR Generator

Modified:
    felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java

Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java?rev=1356844&r1=1356843&r2=1356844&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java (original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java Tue Jul  3 17:38:47 2012
@@ -203,7 +203,7 @@ public class SCRDescriptorGenerator {
                     // we look for the bind/unbind methods
                     // and create them if they are not availabe
                     if (ref.getStrategy() != ReferenceStrategy.LOOKUP && ref.getField() != null
-                        && ref.getField().getClass().getName().equals(container.getClassDescription().getDescribedClass().getName())
+                        && ref.getField().getDeclaringClass().getName().equals(container.getClassDescription().getDescribedClass().getName())
                         && (ref.getCardinality() == ReferenceCardinality.OPTIONAL_UNARY || ref.getCardinality() == ReferenceCardinality.MANDATORY_UNARY)) {
 
                         final String bindValue = ref.getBind();
@@ -226,11 +226,11 @@ public class SCRDescriptorGenerator {
                         if (createBind || createUnbind) {
                             // logging
                             if ( createBind && createUnbind ) {
-                                this.logger.debug("Generating bind and unbind method for " + name + " in " + container.getClassDescription().getClass().getName());
+                                this.logger.debug("Generating bind and unbind method for " + name + " in " + container.getClassDescription().getDescribedClass().getName());
                             } else if ( createBind ) {
-                                this.logger.debug("Generating bind method for " + name + " in " + container.getClassDescription().getClass().getName());
+                                this.logger.debug("Generating bind method for " + name + " in " + container.getClassDescription().getDescribedClass().getName());
                             } else {
-                                this.logger.debug("Generating unbind method for " + name + " in " + container.getClassDescription().getClass().getName());
+                                this.logger.debug("Generating unbind method for " + name + " in " + container.getClassDescription().getDescribedClass().getName());
 
                             }
                             ClassModifier.addMethods(container.getClassDescription().getDescribedClass().getName(),