/[classpath]/classpath/vm/reference/java/lang/reflect/Method.java
ViewVC logotype

Diff of /classpath/vm/reference/java/lang/reflect/Method.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12.2.5 by gnu_andrew, Wed Sep 28 17:50:22 2005 UTC revision 1.12.2.6 by jfrijters, Sat Oct 1 10:02:47 2005 UTC
# Line 353  extends AccessibleObject implements Memb Line 353  extends AccessibleObject implements Memb
353      return p.getTypeParameters();      return p.getTypeParameters();
354    }    }
355    
356      /**
357       * Return the String in the Signature attribute for this method. If there
358       * is no Signature attribute, return null.
359       */
360    private native String getSignature();    private native String getSignature();
361    
362      /**
363       * Returns an array of <code>Type</code> objects that represents
364       * the exception types declared by this method, in declaration order.
365       * An array of size zero is returned if this method declares no
366       * exceptions.
367       *
368       * @return the exception types declared by this method.
369       * @throws GenericSignatureFormatError if the generic signature does
370       *         not conform to the format specified in the Virtual Machine
371       *         specification, version 3.
372       * @since 1.5
373       */
374      public Type[] getGenericExceptionTypes()
375      {
376        String sig = getSignature();
377        if (sig == null)
378          return getExceptionTypes();
379        MethodSignatureParser p = new MethodSignatureParser(this, sig);
380        return p.getGenericExceptionTypes();
381      }
382    
383      /**
384       * Returns an array of <code>Type</code> objects that represents
385       * the parameter list for this method, in declaration order.
386       * An array of size zero is returned if this method takes no
387       * parameters.
388       *
389       * @return a list of the types of the method's parameters
390       * @throws GenericSignatureFormatError if the generic signature does
391       *         not conform to the format specified in the Virtual Machine
392       *         specification, version 3.
393       * @since 1.5
394       */
395      public Type[] getGenericParameterTypes()
396      {
397        String sig = getSignature();
398        if (sig == null)
399          return getParameterTypes();
400        MethodSignatureParser p = new MethodSignatureParser(this, sig);
401        return p.getGenericParameterTypes();
402      }
403    
404      /**
405       * Returns the return type of this method.
406       *
407       * @return the return type of this method
408       * @throws GenericSignatureFormatError if the generic signature does
409       *         not conform to the format specified in the Virtual Machine
410       *         specification, version 3.
411       * @since 1.5
412       */
413      public Type getGenericReturnType()
414      {
415        String sig = getSignature();
416        if (sig == null)
417          return getReturnType();
418        MethodSignatureParser p = new MethodSignatureParser(this, sig);
419        return p.getGenericReturnType();
420      }
421  }  }

Legend:
Removed from v.1.12.2.5  
changed lines
  Added in v.1.12.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26