1. /*
  2. * @(#)WildcardType.java 1.5 04/06/07
  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.type;
  8. import java.util.Collection;
  9. /**
  10. * Represents a wildcard type argument.
  11. * Examples include: <pre><tt>
  12. * ?
  13. * ? extends Number
  14. * ? super T
  15. * </tt></pre>
  16. *
  17. * <p> A wildcard may have its upper bound explicitly set by an
  18. * <tt>extends</tt> clause, its lower bound explicitly set by a
  19. * <tt>super</tt> clause, or neither (but not both).
  20. *
  21. * @author Joseph D. Darcy
  22. * @author Scott Seligman
  23. * @version 1.5 04/06/07
  24. * @since 1.5
  25. */
  26. public interface WildcardType extends TypeMirror {
  27. /**
  28. * Returns the upper bounds of this wildcard.
  29. * If no upper bound is explicitly declared, then
  30. * an empty collection is returned.
  31. *
  32. * @return the upper bounds of this wildcard
  33. */
  34. Collection<ReferenceType> getUpperBounds();
  35. /**
  36. * Returns the lower bounds of this wildcard.
  37. * If no lower bound is explicitly declared, then
  38. * an empty collection is returned.
  39. *
  40. * @return the lower bounds of this wildcard
  41. */
  42. Collection<ReferenceType> getLowerBounds();
  43. }