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