< prev index next >

src/java.base/share/classes/java/lang/reflect/Method.java

Print this page
rev 60127 : 8249205: Remove unnecessary trademark symbols


 260     public Class<?> getReturnType() {
 261         return returnType;
 262     }
 263 
 264     /**
 265      * Returns a {@code Type} object that represents the formal return
 266      * type of the method represented by this {@code Method} object.
 267      *
 268      * <p>If the return type is a parameterized type,
 269      * the {@code Type} object returned must accurately reflect
 270      * the actual type arguments used in the source code.
 271      *
 272      * <p>If the return type is a type variable or a parameterized type, it
 273      * is created. Otherwise, it is resolved.
 274      *
 275      * @return  a {@code Type} object that represents the formal return
 276      *     type of the underlying  method
 277      * @throws GenericSignatureFormatError
 278      *     if the generic method signature does not conform to the format
 279      *     specified in
 280      *     <cite>The Java&trade; Virtual Machine Specification</cite>
 281      * @throws TypeNotPresentException if the underlying method's
 282      *     return type refers to a non-existent type declaration
 283      * @throws MalformedParameterizedTypeException if the
 284      *     underlying method's return typed refers to a parameterized
 285      *     type that cannot be instantiated for any reason
 286      * @since 1.5
 287      */
 288     public Type getGenericReturnType() {
 289       if (getGenericSignature() != null) {
 290         return getGenericInfo().getReturnType();
 291       } else { return getReturnType();}
 292     }
 293 
 294     @Override
 295     Class<?>[] getSharedParameterTypes() {
 296         return parameterTypes;
 297     }
 298 
 299     @Override
 300     Class<?>[] getSharedExceptionTypes() {




 260     public Class<?> getReturnType() {
 261         return returnType;
 262     }
 263 
 264     /**
 265      * Returns a {@code Type} object that represents the formal return
 266      * type of the method represented by this {@code Method} object.
 267      *
 268      * <p>If the return type is a parameterized type,
 269      * the {@code Type} object returned must accurately reflect
 270      * the actual type arguments used in the source code.
 271      *
 272      * <p>If the return type is a type variable or a parameterized type, it
 273      * is created. Otherwise, it is resolved.
 274      *
 275      * @return  a {@code Type} object that represents the formal return
 276      *     type of the underlying  method
 277      * @throws GenericSignatureFormatError
 278      *     if the generic method signature does not conform to the format
 279      *     specified in
 280      *     <cite>The Java Virtual Machine Specification</cite>
 281      * @throws TypeNotPresentException if the underlying method's
 282      *     return type refers to a non-existent type declaration
 283      * @throws MalformedParameterizedTypeException if the
 284      *     underlying method's return typed refers to a parameterized
 285      *     type that cannot be instantiated for any reason
 286      * @since 1.5
 287      */
 288     public Type getGenericReturnType() {
 289       if (getGenericSignature() != null) {
 290         return getGenericInfo().getReturnType();
 291       } else { return getReturnType();}
 292     }
 293 
 294     @Override
 295     Class<?>[] getSharedParameterTypes() {
 296         return parameterTypes;
 297     }
 298 
 299     @Override
 300     Class<?>[] getSharedExceptionTypes() {


< prev index next >