rt/emul/mini/src/main/java/java/lang/reflect/Member.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 26 Feb 2013 16:54:16 +0100
changeset 772 d382dacfd73f
parent 554 emul/mini/src/main/java/java/lang/reflect/Member.java@05224402145d
permissions -rw-r--r--
Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
jtulach@258
     1
/*
jtulach@258
     2
 * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
jtulach@258
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jtulach@258
     4
 *
jtulach@258
     5
 * This code is free software; you can redistribute it and/or modify it
jtulach@258
     6
 * under the terms of the GNU General Public License version 2 only, as
jtulach@258
     7
 * published by the Free Software Foundation.  Oracle designates this
jtulach@258
     8
 * particular file as subject to the "Classpath" exception as provided
jtulach@258
     9
 * by Oracle in the LICENSE file that accompanied this code.
jtulach@258
    10
 *
jtulach@258
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
jtulach@258
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jtulach@258
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
jtulach@258
    14
 * version 2 for more details (a copy is included in the LICENSE file that
jtulach@258
    15
 * accompanied this code).
jtulach@258
    16
 *
jtulach@258
    17
 * You should have received a copy of the GNU General Public License version
jtulach@258
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
jtulach@258
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jtulach@258
    20
 *
jtulach@258
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jtulach@258
    22
 * or visit www.oracle.com if you need additional information or have any
jtulach@258
    23
 * questions.
jtulach@258
    24
 */
jtulach@258
    25
jtulach@258
    26
package java.lang.reflect;
jtulach@258
    27
jtulach@258
    28
/**
jtulach@258
    29
 * Member is an interface that reflects identifying information about
jtulach@258
    30
 * a single member (a field or a method) or a constructor.
jtulach@258
    31
 *
jtulach@258
    32
 * @see java.lang.Class
jtulach@258
    33
 * @see Field
jtulach@258
    34
 * @see Method
jtulach@258
    35
 * @see Constructor
jtulach@258
    36
 *
jtulach@258
    37
 * @author Nakul Saraiya
jtulach@258
    38
 */
jtulach@258
    39
public
jtulach@258
    40
interface Member {
jtulach@258
    41
jtulach@258
    42
    /**
jtulach@258
    43
     * Identifies the set of all public members of a class or interface,
jtulach@258
    44
     * including inherited members.
jtulach@258
    45
     * @see java.lang.SecurityManager#checkMemberAccess
jtulach@258
    46
     */
jtulach@258
    47
    public static final int PUBLIC = 0;
jtulach@258
    48
jtulach@258
    49
    /**
jtulach@258
    50
     * Identifies the set of declared members of a class or interface.
jtulach@258
    51
     * Inherited members are not included.
jtulach@258
    52
     * @see java.lang.SecurityManager#checkMemberAccess
jtulach@258
    53
     */
jtulach@258
    54
    public static final int DECLARED = 1;
jtulach@258
    55
jtulach@258
    56
    /**
jtulach@258
    57
     * Returns the Class object representing the class or interface
jtulach@258
    58
     * that declares the member or constructor represented by this Member.
jtulach@258
    59
     *
jtulach@258
    60
     * @return an object representing the declaring class of the
jtulach@258
    61
     * underlying member
jtulach@258
    62
     */
jtulach@258
    63
    public Class<?> getDeclaringClass();
jtulach@258
    64
jtulach@258
    65
    /**
jtulach@258
    66
     * Returns the simple name of the underlying member or constructor
jtulach@258
    67
     * represented by this Member.
jtulach@258
    68
     *
jtulach@258
    69
     * @return the simple name of the underlying member
jtulach@258
    70
     */
jtulach@258
    71
    public String getName();
jtulach@258
    72
jtulach@258
    73
    /**
jtulach@258
    74
     * Returns the Java language modifiers for the member or
jtulach@258
    75
     * constructor represented by this Member, as an integer.  The
jtulach@258
    76
     * Modifier class should be used to decode the modifiers in
jtulach@258
    77
     * the integer.
jtulach@258
    78
     *
jtulach@258
    79
     * @return the Java language modifiers for the underlying member
jtulach@258
    80
     * @see Modifier
jtulach@258
    81
     */
jtulach@258
    82
    public int getModifiers();
jtulach@258
    83
jtulach@258
    84
    /**
jtulach@258
    85
     * Returns {@code true} if this member was introduced by
jtulach@258
    86
     * the compiler; returns {@code false} otherwise.
jtulach@258
    87
     *
jtulach@258
    88
     * @return true if and only if this member was introduced by
jtulach@258
    89
     * the compiler.
jtulach@258
    90
     * @since 1.5
jtulach@258
    91
     */
jtulach@258
    92
    public boolean isSynthetic();
jtulach@258
    93
}