jtulach@258: /* jtulach@258: * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. jtulach@258: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jtulach@258: * jtulach@258: * This code is free software; you can redistribute it and/or modify it jtulach@258: * under the terms of the GNU General Public License version 2 only, as jtulach@258: * published by the Free Software Foundation. Oracle designates this jtulach@258: * particular file as subject to the "Classpath" exception as provided jtulach@258: * by Oracle in the LICENSE file that accompanied this code. jtulach@258: * jtulach@258: * This code is distributed in the hope that it will be useful, but WITHOUT jtulach@258: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jtulach@258: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jtulach@258: * version 2 for more details (a copy is included in the LICENSE file that jtulach@258: * accompanied this code). jtulach@258: * jtulach@258: * You should have received a copy of the GNU General Public License version jtulach@258: * 2 along with this work; if not, write to the Free Software Foundation, jtulach@258: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jtulach@258: * jtulach@258: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jtulach@258: * or visit www.oracle.com if you need additional information or have any jtulach@258: * questions. jtulach@258: */ jtulach@258: jtulach@258: package java.lang.reflect; jtulach@258: jtulach@258: /** jtulach@258: * Member is an interface that reflects identifying information about jtulach@258: * a single member (a field or a method) or a constructor. jtulach@258: * jtulach@258: * @see java.lang.Class jtulach@258: * @see Field jtulach@258: * @see Method jtulach@258: * @see Constructor jtulach@258: * jtulach@258: * @author Nakul Saraiya jtulach@258: */ jtulach@258: public jtulach@258: interface Member { jtulach@258: jtulach@258: /** jtulach@258: * Identifies the set of all public members of a class or interface, jtulach@258: * including inherited members. jtulach@258: * @see java.lang.SecurityManager#checkMemberAccess jtulach@258: */ jtulach@258: public static final int PUBLIC = 0; jtulach@258: jtulach@258: /** jtulach@258: * Identifies the set of declared members of a class or interface. jtulach@258: * Inherited members are not included. jtulach@258: * @see java.lang.SecurityManager#checkMemberAccess jtulach@258: */ jtulach@258: public static final int DECLARED = 1; jtulach@258: jtulach@258: /** jtulach@258: * Returns the Class object representing the class or interface jtulach@258: * that declares the member or constructor represented by this Member. jtulach@258: * jtulach@258: * @return an object representing the declaring class of the jtulach@258: * underlying member jtulach@258: */ jtulach@258: public Class getDeclaringClass(); jtulach@258: jtulach@258: /** jtulach@258: * Returns the simple name of the underlying member or constructor jtulach@258: * represented by this Member. jtulach@258: * jtulach@258: * @return the simple name of the underlying member jtulach@258: */ jtulach@258: public String getName(); jtulach@258: jtulach@258: /** jtulach@258: * Returns the Java language modifiers for the member or jtulach@258: * constructor represented by this Member, as an integer. The jtulach@258: * Modifier class should be used to decode the modifiers in jtulach@258: * the integer. jtulach@258: * jtulach@258: * @return the Java language modifiers for the underlying member jtulach@258: * @see Modifier jtulach@258: */ jtulach@258: public int getModifiers(); jtulach@258: jtulach@258: /** jtulach@258: * Returns {@code true} if this member was introduced by jtulach@258: * the compiler; returns {@code false} otherwise. jtulach@258: * jtulach@258: * @return true if and only if this member was introduced by jtulach@258: * the compiler. jtulach@258: * @since 1.5 jtulach@258: */ jtulach@258: public boolean isSynthetic(); jtulach@258: }