Author: cziegeler
Date: Mon Jul  7 23:06:41 2008
New Revision: 674727

URL: http://svn.apache.org/viewvc?rev=674727&view=rev
Log:
Clean up code.

Modified:
    
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/PropertyMetadata.java
    
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ReferenceMetadata.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ServiceMetadata.java

Modified: 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/PropertyMetadata.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/PropertyMetadata.java?rev=674727&r1=674726&r2=674727&view=diff
==============================================================================
--- 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/PropertyMetadata.java 
(original)
+++ 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/PropertyMetadata.java 
Mon Jul  7 23:06:41 2008
@@ -1,4 +1,4 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -18,11 +18,7 @@
  */
 package org.apache.felix.scr.impl;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.osgi.service.component.ComponentException;
+import java.util.*;
 
 /**
  * A property descriptor that contains the information for properties
@@ -30,36 +26,36 @@
  *
  */
 public class PropertyMetadata {
-       
+
        // Name of the property (required)
        private String m_name;
-       
+
        // Type of the property (optional)
        private String m_type = "String";
-       
+
        // Value of the type (optional)
        private Object m_value;
-       
+
        // Flag that indicates if this PropertyMetadata has been validated and 
thus has become immutable
        private boolean m_validated = false;
 
        /**
         * Set the name
-        * 
+        *
         * @param name
         */
        public void setName(String name) {
                if (m_validated == true) {
                        return;
                }
-               
+
                m_name = name;
        }
-       
+
 
        /**
         * Set the type
-        * 
+        *
         * @param type
         */
        public void setType(String type) {
@@ -68,24 +64,24 @@
                }
                m_type = type;
        }
-               
+
        /**
         * Set the value
-        * 
+        *
         * @param value
         */
        public void setValue(String value) {
                if (m_validated == true) {
                        return;
                }
-               
+
         m_value = toType( value );
        }
-    
+
     /**
      * Set multiple values as an array, where the values are contained in
      * the string as one value per line.
-     * 
+     *
      * @param values
      */
     public void setValues(String values) {
@@ -98,7 +94,7 @@
                 valueList.add(toType( value ));
             }
         }
-        
+
         // 112.4.5 Except for String objects, the result will be translated to 
an array of primitive types.
         if(m_type.equals("String")) {
             m_value = valueList.toArray( new String[valueList.size()] );
@@ -167,7 +163,7 @@
 
     /**
      * Get the name of the property
-     * 
+     *
      * @return the name of the property
      */
     public String getName() {
@@ -176,7 +172,7 @@
 
     /**
      * Get the type of the property
-     * 
+     *
      * @return the type of the property
      */
     public String getType() {
@@ -185,7 +181,7 @@
 
     /**
      * Get the value of the property
-     * 
+     *
      * @return the value of the property as an Object
      */
     public Object getValue() {
@@ -202,7 +198,7 @@
             throw componentMetadata.validationFailure( "Property name 
attribute is mandatory" );
         }
     }
-    
+
     private Object toType(String value) {
         // 112.4.5 Parsing of the value is done by the valueOf(String) method 
(P. 291)
         // Should the type accept lowercase too?

Modified: 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ReferenceMetadata.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ReferenceMetadata.java?rev=674727&r1=674726&r2=674727&view=diff
==============================================================================
--- 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ReferenceMetadata.java 
(original)
+++ 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ReferenceMetadata.java 
Mon Jul  7 23:06:41 2008
@@ -18,10 +18,6 @@
  */
 package org.apache.felix.scr.impl;
 
-
-import org.osgi.service.component.ComponentException;
-
-
 /**
  * Information associated to a dependency
  *

Modified: 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ServiceMetadata.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ServiceMetadata.java?rev=674727&r1=674726&r2=674727&view=diff
==============================================================================
--- 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ServiceMetadata.java 
(original)
+++ 
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ServiceMetadata.java 
Mon Jul  7 23:06:41 2008
@@ -1,4 +1,4 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -18,11 +18,7 @@
  */
 package org.apache.felix.scr.impl;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.osgi.service.component.ComponentException;
+import java.util.*;
 
 /**
  * This class contains the metadata associated to a service that is provided
@@ -30,51 +26,51 @@
  *
  */
 public class ServiceMetadata {
-       
-       // 112.4.6 Flag that indicates if the service is a ServiceFactory 
+
+       // 112.4.6 Flag that indicates if the service is a ServiceFactory
        private boolean m_serviceFactory = false;
-       
+
        // List of provided interfaces
        private List m_provides = new ArrayList();
-       
+
        // Flag that indicates if this metadata has been validated and has 
become immutable
        private boolean m_validated = false;
-       
+
        /**
         * Setter for the servicefactory attribute of the service element
-        * 
+        *
         * @param serviceFactory
         */
        public void setServiceFactory(boolean serviceFactory) {
                if(m_validated) {
                        return;
-               }                       
-               
+               }
+
                m_serviceFactory = serviceFactory;
        }
-       
+
        /**
         * Add a provided interface to this service
-        * 
+        *
         * @param provide a String containing the name of the provided interface
         */
        public void addProvide(String provide) {
                if(m_validated) {
                        return;
-               }                       
+               }
 
                m_provides.add(provide);
        }
-       
+
        /**
         * Return the flag that defines if it is a service factory or not
-        * 
+        *
         * @return a boolean flag
         */
        public boolean isServiceFactory() {
-               return m_serviceFactory; 
+               return m_serviceFactory;
        }
-       
+
        /**
      * Returns the implemented interfaces
      *
@@ -90,7 +86,7 @@
         }
         return provides;
     }
-    
+
     /**
      * Verify if the semantics of this metadata are correct
      *


Reply via email to