121 * <TH scope="row"><CODE>Runnable[]</CODE></TH>
122 * <TD>{@link ArrayType} whose
123 * {@link ArrayType#componentType() componentType()} is
124 * {@link InterfaceType}</TD>
125 * </TBODY>
126 * </TABLE>
127 *
128 * @see PrimitiveType Subinterface PrimitiveType
129 * @see ReferenceType Subinterface ReferenceType
130 * @see Value Value - for relationship between Type and Value
131 * @see Field#type() Field.type() - for usage examples
132 *
133 * @author Robert Field
134 * @author Gordon Hirsch
135 * @author James McIlree
136 * @since 1.3
137 */
138 public interface Type extends Mirror {
139
140 /**
141 * Returns the JNI-style signature for this type.
142 * <p>
143 * For primitive classes
144 * the returned signature is the signature of the corresponding primitive
145 * type; for example, "I" is returned as the signature of the class
146 * represented by {@link java.lang.Integer#TYPE}.
147 *
148 * @see <a href="doc-files/signature.html">Type Signatures</a>
149 * @return the string containing the type signature.
150 */
151 String signature();
152
153 /**
154 * @return a text representation of this type.
155 */
156 String name();
157 }
|
121 * <TH scope="row"><CODE>Runnable[]</CODE></TH>
122 * <TD>{@link ArrayType} whose
123 * {@link ArrayType#componentType() componentType()} is
124 * {@link InterfaceType}</TD>
125 * </TBODY>
126 * </TABLE>
127 *
128 * @see PrimitiveType Subinterface PrimitiveType
129 * @see ReferenceType Subinterface ReferenceType
130 * @see Value Value - for relationship between Type and Value
131 * @see Field#type() Field.type() - for usage examples
132 *
133 * @author Robert Field
134 * @author Gordon Hirsch
135 * @author James McIlree
136 * @since 1.3
137 */
138 public interface Type extends Mirror {
139
140 /**
141 * Returns the type signature for this type. The result is of the same
142 * form as the descriptor string returned by {@link Class#descriptorString()}.
143 * The returned string may not be a valid type descriptor.
144 *
145 * @see java.lang.invoke.TypeDescriptor#descriptorString()
146 * @return the type signature
147 */
148 String signature();
149
150 /**
151 * Returns the name of this type. The result is of the same form as
152 * the name returned by {@link Class#getName()}.
153 * The returned name may not be a binary name.
154 *
155 * @see Class#getName()
156 * @return the name of this type
157 */
158 String name();
159 }
|