diff options
Diffstat (limited to 'libjava/java/lang/reflect/Member.java')
-rw-r--r-- | libjava/java/lang/reflect/Member.java | 100 |
1 files changed, 54 insertions, 46 deletions
diff --git a/libjava/java/lang/reflect/Member.java b/libjava/java/lang/reflect/Member.java index d76cdda..1c313b0 100644 --- a/libjava/java/lang/reflect/Member.java +++ b/libjava/java/lang/reflect/Member.java @@ -1,4 +1,4 @@ -/* java.lang.reflect.Member +/* java.lang.reflect.Member - common query methods in reflection Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -27,55 +27,63 @@ executable file might be covered by the GNU General Public License. */ package java.lang.reflect; -/* Written using "Java Class Libraries", 2nd edition. - * Status: Believed complete and correct. - */ - /** - * Member is an interface that represents any member of a class. - * i.e. a field, a method or a constructor. - * You can get information about the declaring class, name or modifiers of - * the member with this interface. + * Member is an interface that represents any member of a class (field or + * method) or a constructor. You can get information about the declaring + * class, name or modifiers of the member with this interface. * - * @author John Keiser - * @author Per Bothner <bothner@cygnus.com> + * @author John Keiser + * @author Per Bothner <bothner@cygnus.com> + * @author Eric Blake <ebb9@email.byu.edu> + * @see Class + * @see Field + * @see Method + * @see Constructor + * @since 1.1 + * @status updated to 1.4 */ -public interface Member { - /** - * Represents all members, whether public, private, protected or - * package-protected. - * Used in java.lang.SecurityManager.checkMemberAccess() to determine the - * type of members to access. - */ - static final int DECLARED = 1; +public interface Member +{ + /** + * Represents all members, whether public, private, protected or + * package-protected, but only which are declared in this class. + * Used in SecurityManager.checkMemberAccess() to determine the + * type of members to access. + * @see SecurityManager#checkMemberAccess() + */ + int DECLARED = 1; - /** - * Represents public members only. Used inr - * java.lang.SecurityManager.checkMemberAccess() to determine the type of - * members to access. - */ - static final int PUBLIC = 0; + /** + * Represents public members only, but includes all inherited members. + * Used in SecurityManager.checkMemberAccess() to determine the type of + * members to access. + * @see SecurityManager#checkMemberAccess() + */ + int PUBLIC = 0; - /** - * Gets the class that declared this member. - * <STRONG>It is unclear whether this returns the class that actually - * syntactically declared the member, or the class where the - * <code>Member</code> object was gotten from.</STRONG> - * @return the class that declared this member. - */ - Class getDeclaringClass(); + /** + * Gets the class that declared this member. This is not the class where + * this method was called, or even the class where this Member object + * came to life, but the class that declares the member this represents. + * + * @return the class that declared this member + */ + Class getDeclaringClass(); - /** - * Gets the modifiers this member uses. Use the <code>Modifier</code> - * class to interpret the values. - * @see Modifier - * @return an integer representing the modifiers to this Member. - */ - int getModifiers(); + /** + * Gets the simple name of this member. This will be a valid Java + * identifier, with no qualification. + * + * @return the name of this member + */ + String getName(); - /** - * Gets the name of this member. - * @return the name of this member. - */ - String getName(); + /** + * Gets the modifiers this member uses. Use the <code>Modifier</code> + * class to interpret the values. + * + * @return an integer representing the modifiers to this Member + * @see Modifier + */ + int getModifiers(); } |