273 * 274 * @return a {@code Type} object that represents the formal return 275 * type of the underlying method 276 * @throws GenericSignatureFormatError 277 * if the generic method signature does not conform to the format 278 * specified in 279 * <cite>The Java™ Virtual Machine Specification</cite> 280 * @throws TypeNotPresentException if the underlying method's 281 * return type refers to a non-existent type declaration 282 * @throws MalformedParameterizedTypeException if the 283 * underlying method's return typed refers to a parameterized 284 * type that cannot be instantiated for any reason 285 * @since 1.5 286 */ 287 public Type getGenericReturnType() { 288 if (getGenericSignature() != null) { 289 return getGenericInfo().getReturnType(); 290 } else { return getReturnType();} 291 } 292 293 @Override 294 Class<?>[] getSharedParameterTypes() { 295 return parameterTypes; 296 } 297 298 /** 299 * {@inheritDoc} 300 */ 301 @Override 302 public Class<?>[] getParameterTypes() { 303 return parameterTypes.clone(); 304 } 305 306 /** 307 * {@inheritDoc} 308 * @since 1.8 309 */ 310 public int getParameterCount() { return parameterTypes.length; } 311 312 313 /** 314 * {@inheritDoc} 315 * @throws GenericSignatureFormatError {@inheritDoc} 316 * @throws TypeNotPresentException {@inheritDoc} 317 * @throws MalformedParameterizedTypeException {@inheritDoc} | 273 * 274 * @return a {@code Type} object that represents the formal return 275 * type of the underlying method 276 * @throws GenericSignatureFormatError 277 * if the generic method signature does not conform to the format 278 * specified in 279 * <cite>The Java™ Virtual Machine Specification</cite> 280 * @throws TypeNotPresentException if the underlying method's 281 * return type refers to a non-existent type declaration 282 * @throws MalformedParameterizedTypeException if the 283 * underlying method's return typed refers to a parameterized 284 * type that cannot be instantiated for any reason 285 * @since 1.5 286 */ 287 public Type getGenericReturnType() { 288 if (getGenericSignature() != null) { 289 return getGenericInfo().getReturnType(); 290 } else { return getReturnType();} 291 } 292 293 /** 294 * {@inheritDoc} 295 */ 296 @Override 297 public Class<?>[] getParameterTypes() { 298 return parameterTypes.clone(); 299 } 300 301 /** 302 * {@inheritDoc} 303 * @since 1.8 304 */ 305 public int getParameterCount() { return parameterTypes.length; } 306 307 308 /** 309 * {@inheritDoc} 310 * @throws GenericSignatureFormatError {@inheritDoc} 311 * @throws TypeNotPresentException {@inheritDoc} 312 * @throws MalformedParameterizedTypeException {@inheritDoc} |