Java Code Examples for sun.reflect.annotation.AnnotationParser#parseAnnotations()

The following examples show how to use sun.reflect.annotation.AnnotationParser#parseAnnotations() . 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: Executable.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
private Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    Map<Class<? extends Annotation>, Annotation> declAnnos;
    if ((declAnnos = declaredAnnotations) == null) {
        synchronized (this) {
            if ((declAnnos = declaredAnnotations) == null) {
                Executable root = getRoot();
                if (root != null) {
                    declAnnos = root.declaredAnnotations();
                } else {
                    declAnnos = AnnotationParser.parseAnnotations(
                            getAnnotationBytes(),
                            sun.misc.SharedSecrets.getJavaLangAccess().
                                    getConstantPool(getDeclaringClass()),
                            getDeclaringClass()
                    );
                }
                declaredAnnotations = declAnnos;
            }
        }
    }
    return declAnnos;
}
 
Example 2
Source File: Field.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
private Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    Map<Class<? extends Annotation>, Annotation> declAnnos;
    if ((declAnnos = declaredAnnotations) == null) {
        synchronized (this) {
            if ((declAnnos = declaredAnnotations) == null) {
                Field root = this.root;
                if (root != null) {
                    declAnnos = root.declaredAnnotations();
                } else {
                    declAnnos = AnnotationParser.parseAnnotations(
                            annotations,
                            sun.misc.SharedSecrets.getJavaLangAccess()
                                    .getConstantPool(getDeclaringClass()),
                            getDeclaringClass());
                }
                declaredAnnotations = declAnnos;
            }
        }
    }
    return declAnnos;
}
 
Example 3
Source File: Executable.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    Map<Class<? extends Annotation>, Annotation> declAnnos;
    if ((declAnnos = declaredAnnotations) == null) {
        synchronized (this) {
            if ((declAnnos = declaredAnnotations) == null) {
                Executable root = getRoot();
                if (root != null) {
                    declAnnos = root.declaredAnnotations();
                } else {
                    declAnnos = AnnotationParser.parseAnnotations(
                            getAnnotationBytes(),
                            sun.misc.SharedSecrets.getJavaLangAccess().
                                    getConstantPool(getDeclaringClass()),
                            getDeclaringClass()
                    );
                }
                declaredAnnotations = declAnnos;
            }
        }
    }
    return declAnnos;
}
 
Example 4
Source File: Field.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    Map<Class<? extends Annotation>, Annotation> declAnnos;
    if ((declAnnos = declaredAnnotations) == null) {
        synchronized (this) {
            if ((declAnnos = declaredAnnotations) == null) {
                Field root = this.root;
                if (root != null) {
                    declAnnos = root.declaredAnnotations();
                } else {
                    declAnnos = AnnotationParser.parseAnnotations(
                            annotations,
                            sun.misc.SharedSecrets.getJavaLangAccess()
                                    .getConstantPool(getDeclaringClass()),
                            getDeclaringClass());
                }
                declaredAnnotations = declAnnos;
            }
        }
    }
    return declAnnos;
}
 
Example 5
Source File: Executable.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    Map<Class<? extends Annotation>, Annotation> declAnnos;
    if ((declAnnos = declaredAnnotations) == null) {
        synchronized (this) {
            if ((declAnnos = declaredAnnotations) == null) {
                Executable root = getRoot();
                if (root != null) {
                    declAnnos = root.declaredAnnotations();
                } else {
                    declAnnos = AnnotationParser.parseAnnotations(
                            getAnnotationBytes(),
                            SharedSecrets.getJavaLangAccess().
                                    getConstantPool(getDeclaringClass()),
                            getDeclaringClass()
                    );
                }
                declaredAnnotations = declAnnos;
            }
        }
    }
    return declAnnos;
}
 
Example 6
Source File: Field.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
private Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    Map<Class<? extends Annotation>, Annotation> declAnnos;
    if ((declAnnos = declaredAnnotations) == null) {
        synchronized (this) {
            if ((declAnnos = declaredAnnotations) == null) {
                Field root = this.root;
                if (root != null) {
                    declAnnos = root.declaredAnnotations();
                } else {
                    declAnnos = AnnotationParser.parseAnnotations(
                            annotations,
                            SharedSecrets.getJavaLangAccess()
                                    .getConstantPool(getDeclaringClass()),
                            getDeclaringClass());
                }
                declaredAnnotations = declAnnos;
            }
        }
    }
    return declAnnos;
}
 
Example 7
Source File: Executable.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
private Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    Map<Class<? extends Annotation>, Annotation> declAnnos;
    if ((declAnnos = declaredAnnotations) == null) {
        synchronized (this) {
            if ((declAnnos = declaredAnnotations) == null) {
                Executable root = (Executable)getRoot();
                if (root != null) {
                    declAnnos = root.declaredAnnotations();
                } else {
                    declAnnos = AnnotationParser.parseAnnotations(
                            getAnnotationBytes(),
                            SharedSecrets.getJavaLangAccess().
                                    getConstantPool(getDeclaringClass()),
                            getDeclaringClass()
                    );
                }
                declaredAnnotations = declAnnos;
            }
        }
    }
    return declAnnos;
}
 
Example 8
Source File: Executable.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Executable root = getRoot();
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                getAnnotationBytes(),
                sun.misc.SharedSecrets.getJavaLangAccess().
                getConstantPool(getDeclaringClass()),
                getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 9
Source File: Executable.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        declaredAnnotations = AnnotationParser.parseAnnotations(
            getAnnotationBytes(),
            sun.misc.SharedSecrets.getJavaLangAccess().
            getConstantPool(getDeclaringClass()),
            getDeclaringClass());
    }
    return declaredAnnotations;
}
 
Example 10
Source File: Field.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Field root = this.root;
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                    annotations,
                    sun.misc.SharedSecrets.getJavaLangAccess().getConstantPool(getDeclaringClass()),
                    getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 11
Source File: Field.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Field root = this.root;
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                    annotations,
                    sun.misc.SharedSecrets.getJavaLangAccess().getConstantPool(getDeclaringClass()),
                    getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 12
Source File: Field.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Field root = this.root;
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                    annotations,
                    sun.misc.SharedSecrets.getJavaLangAccess().getConstantPool(getDeclaringClass()),
                    getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 13
Source File: Field.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        declaredAnnotations = AnnotationParser.parseAnnotations(
            annotations, sun.misc.SharedSecrets.getJavaLangAccess().
            getConstantPool(getDeclaringClass()),
            getDeclaringClass());
    }
    return declaredAnnotations;
}
 
Example 14
Source File: Field.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Field root = this.root;
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                    annotations,
                    sun.misc.SharedSecrets.getJavaLangAccess().getConstantPool(getDeclaringClass()),
                    getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 15
Source File: Executable.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Executable root = getRoot();
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                getAnnotationBytes(),
                sun.misc.SharedSecrets.getJavaLangAccess().
                getConstantPool(getDeclaringClass()),
                getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 16
Source File: Field.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Field root = this.root;
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                    annotations,
                    sun.misc.SharedSecrets.getJavaLangAccess().getConstantPool(getDeclaringClass()),
                    getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 17
Source File: Constructor.java    From jdk-1.7-annotated with Apache License 2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        declaredAnnotations = AnnotationParser.parseAnnotations(
            annotations, sun.misc.SharedSecrets.getJavaLangAccess().
            getConstantPool(getDeclaringClass()),
            getDeclaringClass());
    }
    return declaredAnnotations;
}
 
Example 18
Source File: Field.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Field root = this.root;
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                    annotations,
                    sun.misc.SharedSecrets.getJavaLangAccess().getConstantPool(getDeclaringClass()),
                    getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 19
Source File: Executable.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Executable root = getRoot();
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                getAnnotationBytes(),
                sun.misc.SharedSecrets.getJavaLangAccess().
                getConstantPool(getDeclaringClass()),
                getDeclaringClass());
        }
    }
    return declaredAnnotations;
}
 
Example 20
Source File: Field.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private synchronized  Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
    if (declaredAnnotations == null) {
        Field root = this.root;
        if (root != null) {
            declaredAnnotations = root.declaredAnnotations();
        } else {
            declaredAnnotations = AnnotationParser.parseAnnotations(
                    annotations,
                    sun.misc.SharedSecrets.getJavaLangAccess().getConstantPool(getDeclaringClass()),
                    getDeclaringClass());
        }
    }
    return declaredAnnotations;
}