1. /*
  2. * @(#)Member.java 1.16 04/02/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.lang.reflect;
  8. /**
  9. * Member is an interface that reflects identifying information about
  10. * a single member (a field or a method) or a constructor.
  11. *
  12. * @see java.lang.Class
  13. * @see Field
  14. * @see Method
  15. * @see Constructor
  16. *
  17. * @author Nakul Saraiya
  18. */
  19. public
  20. interface Member {
  21. /**
  22. * Identifies the set of all public members of a class or interface,
  23. * including inherited members.
  24. * @see java.lang.SecurityManager#checkMemberAccess
  25. */
  26. public static final int PUBLIC = 0;
  27. /**
  28. * Identifies the set of declared members of a class or interface.
  29. * Inherited members are not included.
  30. * @see java.lang.SecurityManager#checkMemberAccess
  31. */
  32. public static final int DECLARED = 1;
  33. /**
  34. * Returns the Class object representing the class or interface
  35. * that declares the member or constructor represented by this Member.
  36. *
  37. * @return an object representing the declaring class of the
  38. * underlying member
  39. */
  40. public Class getDeclaringClass();
  41. /**
  42. * Returns the simple name of the underlying member or constructor
  43. * represented by this Member.
  44. *
  45. * @return the simple name of the underlying member
  46. */
  47. public String getName();
  48. /**
  49. * Returns the Java language modifiers for the member or
  50. * constructor represented by this Member, as an integer. The
  51. * Modifier class should be used to decode the modifiers in
  52. * the integer.
  53. *
  54. * @return the Java language modifiers for the underlying member
  55. * @see Modifier
  56. */
  57. public int getModifiers();
  58. /**
  59. * Returns <tt>true</tt> if this member was introduced by
  60. * the compiler; returns <tt>false</tt> otherwise.
  61. *
  62. * @return true if and only if this member was introduced by
  63. * the compiler.
  64. * @since 1.5
  65. */
  66. public boolean isSynthetic();
  67. }