1. /*
  2. * @(#)ExecutableDeclaration.java 1.2 04/03/08
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.mirror.declaration;
  8. import java.util.Collection;
  9. import com.sun.mirror.type.ReferenceType;
  10. /**
  11. * Represents a method or constructor of a class or interface.
  12. *
  13. * @author Joseph D. Darcy
  14. * @author Scott Seligman
  15. * @version 1.2 04/03/08
  16. * @since 1.5
  17. */
  18. public interface ExecutableDeclaration extends MemberDeclaration {
  19. /**
  20. * Returns <tt>true</tt> if this method or constructor accepts a variable
  21. * number of arguments.
  22. *
  23. * @return <tt>true</tt> if this method or constructor accepts a variable
  24. * number of arguments
  25. */
  26. boolean isVarArgs();
  27. /**
  28. * Returns the formal type parameters of this method or constructor.
  29. * They are returned in declaration order.
  30. *
  31. * @return the formal type parameters of this method or constructor,
  32. * or an empty collection if there are none
  33. */
  34. Collection<TypeParameterDeclaration> getFormalTypeParameters();
  35. /**
  36. * Returns the formal parameters of this method or constructor.
  37. * They are returned in declaration order.
  38. *
  39. * @return the formal parameters of this method or constructor,
  40. * or an empty collection if there are none
  41. */
  42. Collection<ParameterDeclaration> getParameters();
  43. /**
  44. * Returns the exceptions and other throwables listed in this
  45. * method or constructor's <tt>throws</tt> clause.
  46. *
  47. * @return the exceptions and other throwables listed in the
  48. * <tt>throws</tt> clause, or an empty collection if there are none
  49. */
  50. Collection<ReferenceType> getThrownTypes();
  51. }