You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jb...@apache.org on 2004/02/08 22:52:59 UTC

cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean GBeanInfoFactory.java GOperationInfo.java

jboynes     2004/02/08 13:52:59

  Modified:    modules/kernel/src/java/org/apache/geronimo/gbean
                        GBeanInfoFactory.java GOperationInfo.java
  Log:
  Add constructors which get the names from Classes
  
  Revision  Changes    Path
  1.8       +5 -1      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoFactory.java
  
  Index: GBeanInfoFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- GBeanInfoFactory.java	25 Jan 2004 21:07:04 -0000	1.7
  +++ GBeanInfoFactory.java	8 Feb 2004 21:52:59 -0000	1.8
  @@ -82,6 +82,10 @@
           this(name, name);
       }
   
  +    public GBeanInfoFactory(Class clazz) {
  +        this.name = this.className = clazz.getName();
  +    }
  +
       public GBeanInfoFactory(String name, String className) {
           this.name = name;
           this.className = className;
  
  
  
  1.5       +10 -1     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/GOperationInfo.java
  
  Index: GOperationInfo.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/GOperationInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GOperationInfo.java	18 Jan 2004 01:22:42 -0000	1.4
  +++ GOperationInfo.java	8 Feb 2004 21:52:59 -0000	1.5
  @@ -86,6 +86,15 @@
           this(name, name, Collections.EMPTY_LIST);
       }
   
  +    public GOperationInfo(String name, Class[] paramTypes) {
  +        this.name = this.methodName = name;
  +        String[] args = new String[paramTypes.length];
  +        for (int i = 0; i < args.length; i++) {
  +            args[i] = paramTypes[i].getName();
  +        }
  +        this.parameters = Collections.unmodifiableList(Arrays.asList(args));
  +    }
  +
       public GOperationInfo(String name, String[] paramTypes) {
           this(name, name, Arrays.asList(paramTypes));
       }