sun.reflect.annotation.TypeAnnotationParser Java Examples

The following examples show how to use sun.reflect.annotation.TypeAnnotationParser. 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: Field.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #2
Source File: Constructor.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #3
Source File: Executable.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #4
Source File: Constructor.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #5
Source File: Constructor.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #6
Source File: Constructor.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #7
Source File: Field.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #8
Source File: Executable.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #9
Source File: Field.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #10
Source File: Executable.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #11
Source File: Constructor.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #12
Source File: Executable.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #13
Source File: Field.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #14
Source File: Field.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #15
Source File: Constructor.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #16
Source File: Executable.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #17
Source File: Constructor.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #18
Source File: Field.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #19
Source File: Executable.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #20
Source File: Field.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #21
Source File: Field.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #22
Source File: Constructor.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #23
Source File: Executable.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #24
Source File: Constructor.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    Class<?> thisDeclClass = getDeclaringClass();
    Class<?> enclosingClass = thisDeclClass.getEnclosingClass();

    if (enclosingClass == null) {
        // A Constructor for a top-level class
        return null;
    }

    Class<?> outerDeclaringClass = thisDeclClass.getDeclaringClass();
    if (outerDeclaringClass == null) {
        // A constructor for a local or anonymous class
        return null;
    }

    // Either static nested or inner class
    if (Modifier.isStatic(thisDeclClass.getModifiers())) {
        // static nested
        return null;
    }

    // A Constructor for an inner class
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            SharedSecrets.getJavaLangAccess().
                getConstantPool(thisDeclClass),
            this,
            thisDeclClass,
            enclosingClass,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #25
Source File: Field.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #26
Source File: Field.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
     * Returns an AnnotatedType object that represents the use of a type to specify
     * the declared type of the field represented by this Field.
     * @return an object representing the declared type of the field
     * represented by this Field
     *
     * @since 1.8
     */
    public AnnotatedType getAnnotatedType() {
        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                                                       sun.misc.SharedSecrets.getJavaLangAccess().
                                                           getConstantPool(getDeclaringClass()),
                                                       this,
                                                       getDeclaringClass(),
                                                       getGenericType(),
                                                       TypeAnnotation.TypeAnnotationTarget.FIELD);
}
 
Example #27
Source File: Executable.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #28
Source File: Constructor.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    Class<?> thisDeclClass = getDeclaringClass();
    Class<?> enclosingClass = thisDeclClass.getEnclosingClass();

    if (enclosingClass == null) {
        // A Constructor for a top-level class
        return null;
    }

    Class<?> outerDeclaringClass = thisDeclClass.getDeclaringClass();
    if (outerDeclaringClass == null) {
        // A constructor for a local or anonymous class
        return null;
    }

    // Either static nested or inner class
    if (Modifier.isStatic(thisDeclClass.getModifiers())) {
        // static nested
        return null;
    }

    // A Constructor for an inner class
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            SharedSecrets.getJavaLangAccess().
                getConstantPool(thisDeclClass),
            this,
            thisDeclClass,
            enclosingClass,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}
 
Example #29
Source File: Executable.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
AnnotatedType getAnnotatedReturnType0(Type returnType) {
    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            returnType,
            TypeAnnotation.TypeAnnotationTarget.METHOD_RETURN);
}
 
Example #30
Source File: Constructor.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @since 1.8
 */
@Override
public AnnotatedType getAnnotatedReceiverType() {
    if (getDeclaringClass().getEnclosingClass() == null)
        return super.getAnnotatedReceiverType();

    return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
            sun.misc.SharedSecrets.getJavaLangAccess().
                    getConstantPool(getDeclaringClass()),
            this,
            getDeclaringClass(),
            getDeclaringClass().getEnclosingClass(),
            TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
}