Java Code Examples for sun.reflect.generics.repository.ClassRepository#getSuperInterfaces()

The following examples show how to use sun.reflect.generics.repository.ClassRepository#getSuperInterfaces() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Class.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p>If this object represents a class, the return value is an array
 * containing objects representing all interfaces directly implemented by
 * the class.  The order of the interface objects in the array corresponds
 * to the order of the interface names in the {@code implements} clause of
 * the declaration of the class represented by this object.
 *
 * <p>If this object represents an interface, the array contains objects
 * representing all interfaces directly extended by the interface.  The
 * order of the interface objects in the array corresponds to the order of
 * the interface names in the {@code extends} clause of the declaration of
 * the interface represented by this object.
 *
 * <p>If this object represents a class or interface that implements no
 * interfaces, the method returns an array of length 0.
 *
 * <p>If this object represents a primitive type or void, the method
 * returns an array of length 0.
 *
 * <p>If this {@code Class} object represents an array type, the
 * interfaces {@code Cloneable} and {@code java.io.Serializable} are
 * returned in that order.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces directly implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 2
Source File: Class.java    From jdk8u-dev-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 3
Source File: Class.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 4
Source File: Class.java    From jdk8u_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 5
Source File: Class.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 6
Source File: Class.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 7
Source File: Class.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 8
Source File: Class.java    From Java8CN with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 9
Source File: Class.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 10
Source File: Class.java    From jdk1.8-source-analysis with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 11
Source File: Class.java    From Bytecoder with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type arguments used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p>If this object represents a class, the return value is an array
 * containing objects representing all interfaces directly implemented by
 * the class.  The order of the interface objects in the array corresponds
 * to the order of the interface names in the {@code implements} clause of
 * the declaration of the class represented by this object.
 *
 * <p>If this object represents an interface, the array contains objects
 * representing all interfaces directly extended by the interface.  The
 * order of the interface objects in the array corresponds to the order of
 * the interface names in the {@code extends} clause of the declaration of
 * the interface represented by this object.
 *
 * <p>If this object represents a class or interface that implements no
 * interfaces, the method returns an array of length 0.
 *
 * <p>If this object represents a primitive type or void, the method
 * returns an array of length 0.
 *
 * <p>If this {@code Class} object represents an array type, the
 * interfaces {@code Cloneable} and {@code java.io.Serializable} are
 * returned in that order.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces directly implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 12
Source File: Class.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 13
Source File: Class.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 14
Source File: Class.java    From JDKSourceCode1.8 with MIT License 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 15
Source File: Class.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 16
Source File: Class.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}
 
Example 17
Source File: Class.java    From dragonwell8_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the {@code Type}s representing the interfaces
 * directly implemented by the class or interface represented by
 * this object.
 *
 * <p>If a superinterface is a parameterized type, the
 * {@code Type} object returned for it must accurately reflect
 * the actual type parameters used in the source code. The
 * parameterized type representing each superinterface is created
 * if it had not been created before. See the declaration of
 * {@link java.lang.reflect.ParameterizedType ParameterizedType}
 * for the semantics of the creation process for parameterized
 * types.
 *
 * <p> If this object represents a class, the return value is an
 * array containing objects representing all interfaces
 * implemented by the class. The order of the interface objects in
 * the array corresponds to the order of the interface names in
 * the {@code implements} clause of the declaration of the class
 * represented by this object.  In the case of an array class, the
 * interfaces {@code Cloneable} and {@code Serializable} are
 * returned in that order.
 *
 * <p>If this object represents an interface, the array contains
 * objects representing all interfaces directly extended by the
 * interface.  The order of the interface objects in the array
 * corresponds to the order of the interface names in the
 * {@code extends} clause of the declaration of the interface
 * represented by this object.
 *
 * <p>If this object represents a class or interface that
 * implements no interfaces, the method returns an array of length
 * 0.
 *
 * <p>If this object represents a primitive type or void, the
 * method returns an array of length 0.
 *
 * @throws java.lang.reflect.GenericSignatureFormatError
 *     if the generic class signature does not conform to the format
 *     specified in
 *     <cite>The Java&trade; Virtual Machine Specification</cite>
 * @throws TypeNotPresentException if any of the generic
 *     superinterfaces refers to a non-existent type declaration
 * @throws java.lang.reflect.MalformedParameterizedTypeException
 *     if any of the generic superinterfaces refer to a parameterized
 *     type that cannot be instantiated for any reason
 * @return an array of interfaces implemented by this class
 * @since 1.5
 */
public Type[] getGenericInterfaces() {
    ClassRepository info = getGenericInfo();
    return (info == null) ?  getInterfaces() : info.getSuperInterfaces();
}