0N/A/*
2362N/A * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage com.sun.jdi;
0N/A
0N/A/**
0N/A * An entity declared within a user defined
0N/A * type (class or interface).
0N/A * This interface is the root of the type
0N/A * component hierarchy which
0N/A * includes {@link Field} and {@link Method}.
0N/A * Type components of the same name declared in different classes
0N/A * (including those related by inheritance) have different
0N/A * TypeComponent objects.
0N/A * TypeComponents can be used alone to retrieve static information
0N/A * about their declaration, or can be used in conjunction with a
0N/A * {@link ReferenceType} or {@link ObjectReference} to access values
0N/A * or invoke, as applicable.
0N/A *
0N/A * @author Robert Field
0N/A * @author Gordon Hirsch
0N/A * @author James McIlree
0N/A * @since 1.3
0N/A */
0N/Apublic interface TypeComponent extends Mirror, Accessible {
0N/A
0N/A /**
0N/A * Gets the name of this type component.
0N/A * <P>
0N/A * Note: for fields, this is the field name; for methods,
0N/A * this is the method name; for constructors, this is &lt;init&gt;;
0N/A * for static initializers, this is &lt;clinit&gt;.
0N/A *
0N/A * @return a string containing the name.
0N/A */
0N/A String name();
0N/A
0N/A /**
0N/A * Gets the JNI-style signature for this type component. The
0N/A * signature is encoded type information as defined
0N/A * in the JNI documentation. It is a convenient, compact format for
0N/A * for manipulating type information internally, not necessarily
0N/A * for display to an end user. See {@link Field#typeName} and
0N/A * {@link Method#returnTypeName} for ways to help get a more readable
0N/A * representation of the type.
0N/A *
0N/A * @see <a href="doc-files/signature.html">Type Signatures</a>
0N/A * @return a string containing the signature
0N/A */
0N/A String signature();
0N/A
0N/A /**
0N/A * Gets the generic signature for this TypeComponent if there is one.
0N/A * Generic signatures are described in the
4008N/A * <cite>The Java&trade; Virtual Machine Specification</cite>.
0N/A *
0N/A * @return a string containing the generic signature, or <code>null</code>
0N/A * if there is no generic signature.
0N/A *
0N/A * @since 1.5
0N/A */
0N/A String genericSignature();
0N/A
0N/A /**
0N/A * Returns the type in which this component was declared. The
0N/A * returned {@link ReferenceType} mirrors either a class or an
0N/A * interface in the target VM.
0N/A *
0N/A * @return a {@link ReferenceType} for the type that declared
0N/A * this type component.
0N/A */
0N/A ReferenceType declaringType();
0N/A
0N/A /**
0N/A * Determines if this TypeComponent is static.
0N/A * Return value is undefined for constructors and static initializers.
0N/A *
0N/A * @return <code>true</code> if this type component was declared
0N/A * static; false otherwise.
0N/A */
0N/A boolean isStatic();
0N/A
0N/A /**
0N/A * Determines if this TypeComponent is final.
0N/A * Return value is undefined for constructors and static initializers.
0N/A *
0N/A * @return <code>true</code> if this type component was declared
0N/A * final; false otherwise.
0N/A */
0N/A boolean isFinal();
0N/A
0N/A /**
0N/A * Determines if this TypeComponent is synthetic. Synthetic members
0N/A * are generated by the compiler and are not present in the source
0N/A * code for the containing class.
0N/A * <p>
0N/A * Not all target VMs support this query. See
0N/A * {@link VirtualMachine#canGetSyntheticAttribute} to determine if the
0N/A * operation is supported.
0N/A *
0N/A * @return <code>true</code> if this type component is synthetic;
0N/A * <code>false</code> otherwise.
0N/A * @throws java.lang.UnsupportedOperationException if the target
0N/A * VM cannot provide information on synthetic attributes.
0N/A */
0N/A boolean isSynthetic();
0N/A}