41 *
42 * @author Robert Field
43 * @author Gordon Hirsch
44 * @author James McIlree
45 * @since 1.3
46 */
47 public interface TypeComponent extends Mirror, Accessible {
48
49 /**
50 * Gets the name of this type component.
51 * <P>
52 * Note: for fields, this is the field name; for methods,
53 * this is the method name; for constructors, this is <init>;
54 * for static initializers, this is <clinit>.
55 *
56 * @return a string containing the name.
57 */
58 String name();
59
60 /**
61 * Gets the JNI-style signature for this type component. The
62 * signature is encoded type information as defined
63 * in the JNI documentation. It is a convenient, compact format for
64 * for manipulating type information internally, not necessarily
65 * for display to an end user. See {@link Field#typeName} and
66 * {@link Method#returnTypeName} for ways to help get a more readable
67 * representation of the type.
68 *
69 * @see <a href="doc-files/signature.html">Type Signatures</a>
70 * @return a string containing the signature
71 */
72 String signature();
73
74 /**
75 * Gets the generic signature for this TypeComponent if there is one.
76 * Generic signatures are described in the
77 * <cite>The Java™ Virtual Machine Specification</cite>.
78 *
79 * @return a string containing the generic signature, or <code>null</code>
80 * if there is no generic signature.
81 *
82 * @since 1.5
83 */
84 String genericSignature();
85
86 /**
87 * Returns the type in which this component was declared. The
88 * returned {@link ReferenceType} mirrors either a class or an
89 * interface in the target VM.
|
41 *
42 * @author Robert Field
43 * @author Gordon Hirsch
44 * @author James McIlree
45 * @since 1.3
46 */
47 public interface TypeComponent extends Mirror, Accessible {
48
49 /**
50 * Gets the name of this type component.
51 * <P>
52 * Note: for fields, this is the field name; for methods,
53 * this is the method name; for constructors, this is <init>;
54 * for static initializers, this is <clinit>.
55 *
56 * @return a string containing the name.
57 */
58 String name();
59
60 /**
61 * Gets the <a href="{@docRoot}/../specs/jni/types.html#type-signatures">
62 * JNI-style signature</a> for this type component. The
63 * signature is encoded type information as defined
64 * in the JNI documentation. It is a convenient, compact format for
65 * for manipulating type information internally, not necessarily
66 * for display to an end user. See {@link Field#typeName} and
67 * {@link Method#returnTypeName} for ways to help get a more readable
68 * representation of the type.
69 *
70 * @return a string containing the signature
71 */
72 String signature();
73
74 /**
75 * Gets the generic signature for this TypeComponent if there is one.
76 * Generic signatures are described in the
77 * <cite>The Java™ Virtual Machine Specification</cite>.
78 *
79 * @return a string containing the generic signature, or <code>null</code>
80 * if there is no generic signature.
81 *
82 * @since 1.5
83 */
84 String genericSignature();
85
86 /**
87 * Returns the type in which this component was declared. The
88 * returned {@link ReferenceType} mirrors either a class or an
89 * interface in the target VM.
|