geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r766904 - in /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint: context/ reflect/
Date Mon, 20 Apr 2009 22:53:57 GMT
Author: gawor
Date: Mon Apr 20 22:53:56 2009
New Revision: 766904

URL: http://svn.apache.org/viewvc?rev=766904&view=rev
Log:
some minor parser fixes

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/LocalComponentMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MethodInjectionMetadataImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java?rev=766904&r1=766903&r2=766904&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java
Mon Apr 20 22:53:56 2009
@@ -53,6 +53,7 @@
 import org.apache.geronimo.blueprint.reflect.ListValueImpl;
 import org.apache.geronimo.blueprint.reflect.LocalComponentMetadataImpl;
 import org.apache.geronimo.blueprint.reflect.MapValueImpl;
+import org.apache.geronimo.blueprint.reflect.MethodInjectionMetadataImpl;
 import org.apache.geronimo.blueprint.reflect.ParameterSpecificationImpl;
 import org.apache.geronimo.blueprint.reflect.PropertiesValueImpl;
 import org.apache.geronimo.blueprint.reflect.PropertyInjectionMetadataImpl;
@@ -156,6 +157,8 @@
     public static final String INIT_METHOD_ATTRIBUTE = "init-method";
     public static final String DESTROY_METHOD_ATTRIBUTE = "destroy-method";
     public static final String LAZY_INIT_ATTRIBUTE = "lazy-init";
+    public static final String FACTORY_COMPONENT_ATTRIBUTE = "factory-component";
+    public static final String FACTORY_METHOD_ATTRIBUTE = "factory-method";
 
     public static final String BOOLEAN_DEFAULT = "default";
     public static final String BOOLEAN_TRUE = "true";
@@ -384,6 +387,13 @@
         if (element.hasAttribute(DESTROY_METHOD_ATTRIBUTE)) {
             metadata.setDestroyMethodName(element.getAttribute(DESTROY_METHOD_ATTRIBUTE));
         }
+        if (element.hasAttribute(FACTORY_COMPONENT_ATTRIBUTE)) {
+            metadata.setFactoryComponent(new ReferenceValueImpl(element.getAttribute(FACTORY_COMPONENT_ATTRIBUTE)));
+        }
+        if (element.hasAttribute(FACTORY_METHOD_ATTRIBUTE)) {
+            String factoryMethod = element.getAttribute(FACTORY_METHOD_ATTRIBUTE);
+            metadata.setFactoryMethodMetadata(new MethodInjectionMetadataImpl(factoryMethod,
null));
+        }
 
         // Parse elements
         int indexConstructor = 0;

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/LocalComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/LocalComponentMetadataImpl.java?rev=766904&r1=766903&r2=766904&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/LocalComponentMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/LocalComponentMetadataImpl.java
Mon Apr 20 22:53:56 2009
@@ -105,7 +105,11 @@
     }
 
     public Collection<PropertyInjectionMetadata> getPropertyInjectionMetadata() {
-        return Collections.unmodifiableCollection(propertyInjectionMetadata);
+        if (propertyInjectionMetadata == null) {
+            return Collections.emptyList();
+        } else {
+            return Collections.unmodifiableCollection(propertyInjectionMetadata);
+        }
     }
 
     public boolean isLazy() {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MethodInjectionMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MethodInjectionMetadataImpl.java?rev=766904&r1=766903&r2=766904&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MethodInjectionMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/MethodInjectionMetadataImpl.java
Mon Apr 20 22:53:56 2009
@@ -65,7 +65,11 @@
     }
 
     public List<ParameterSpecification> getParameterSpecifications() {
-        return Collections.unmodifiableList(parameterSpecifications);
+        if (parameterSpecifications == null) {
+            return Collections.emptyList();
+        } else {
+            return Collections.unmodifiableList(parameterSpecifications);
+        }
     }
 
     public void setParameterSpecifications(List<ParameterSpecification> parameterSpecifications)
{

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java?rev=766904&r1=766903&r2=766904&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/ServiceReferenceComponentMetadataImpl.java
Mon Apr 20 22:53:56 2009
@@ -96,7 +96,11 @@
     }
 
     public Collection<BindingListenerMetadata> getBindingListeners() {
-        return Collections.unmodifiableCollection(bindingListeners);
+        if (bindingListeners == null) {
+            return Collections.emptyList();
+        } else {
+            return Collections.unmodifiableCollection(bindingListeners);
+        }
     }
 
     public void addBindingListener(BindingListenerMetadata bindingListenerMetadata) {



Mime
View raw message