jdk.jfr.internal.AnnotationConstruct Java Examples

The following examples show how to use jdk.jfr.internal.AnnotationConstruct. 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: ValueDescriptor.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
ValueDescriptor(Class<?> type, String name, List<AnnotationElement> annotations, boolean allowArray) {
    Objects.requireNonNull(annotations);
    Utils.checkRegisterPermission();
    if (!allowArray) {
        if (type.isArray()) {
            throw new IllegalArgumentException("Array types are not allowed");
        }
    }
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(Utils.getValidType(Objects.requireNonNull(type), Objects.requireNonNull(name)));
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.javaFieldName = name; // Needed for dynamic events
    this.isArray = type.isArray();
    // Assume we always want to store String and Thread in constant pool
    this.constantPool = type == Class.class || type == Thread.class;
}
 
Example #2
Source File: ValueDescriptor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
ValueDescriptor(Class<?> type, String name, List<AnnotationElement> annotations, boolean allowArray) {
    Objects.requireNonNull(annotations);
    Utils.checkRegisterPermission();
    if (!allowArray) {
        if (type.isArray()) {
            throw new IllegalArgumentException("Array types are not allowed");
        }
    }
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(Utils.getValidType(Objects.requireNonNull(type), Objects.requireNonNull(name)));
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.javaFieldName = name; // Needed for dynamic events
    this.isArray = type.isArray();
    // Assume we always want to store String and Thread in constant pool
    this.constantPool = type == Class.class || type == Thread.class;
}
 
Example #3
Source File: ValueDescriptor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
ValueDescriptor(Class<?> type, String name, List<AnnotationElement> annotations, boolean allowArray) {
    Objects.requireNonNull(annotations);
    Utils.checkRegisterPermission();
    if (!allowArray) {
        if (type.isArray()) {
            throw new IllegalArgumentException("Array types are not allowed");
        }
    }
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(Utils.getValidType(Objects.requireNonNull(type), Objects.requireNonNull(name)));
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.javaFieldName = name; // Needed for dynamic events
    this.isArray = type.isArray();
    // Assume we always want to store String and Thread in constant pool
    this.constantPool = type == Class.class || type == Thread.class;
}
 
Example #4
Source File: ValueDescriptor.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
ValueDescriptor(Type type, String name, List<AnnotationElement> annotations, int dimension, boolean constantPool, String fieldName) {
    Objects.requireNonNull(annotations);
    if (dimension < 0) {
        throw new IllegalArgumentException("Dimension must be positive");
    }
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(type);
    this.isArray = dimension > 0;
    this.constantPool = constantPool;
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.javaFieldName = fieldName;
}
 
Example #5
Source File: SettingDescriptor.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
SettingDescriptor(Type type, String name, String defaultValue, List<AnnotationElement> annotations) {
    Objects.requireNonNull(annotations);
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(type);
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.defaultValue = Objects.requireNonNull(defaultValue);
}
 
Example #6
Source File: ValueDescriptor.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
ValueDescriptor(Type type, String name, List<AnnotationElement> annotations, int dimension, boolean constantPool, String fieldName) {
    Objects.requireNonNull(annotations);
    if (dimension < 0) {
        throw new IllegalArgumentException("Dimension must be positive");
    }
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(type);
    this.isArray = dimension > 0;
    this.constantPool = constantPool;
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.javaFieldName = fieldName;
}
 
Example #7
Source File: SettingDescriptor.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
SettingDescriptor(Type type, String name, String defaultValue, List<AnnotationElement> annotations) {
    Objects.requireNonNull(annotations);
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(type);
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.defaultValue = Objects.requireNonNull(defaultValue);
}
 
Example #8
Source File: ValueDescriptor.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
ValueDescriptor(Type type, String name, List<AnnotationElement> annotations, int dimension, boolean constantPool, String fieldName) {
    Objects.requireNonNull(annotations);
    if (dimension < 0) {
        throw new IllegalArgumentException("Dimension must be positive");
    }
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(type);
    this.isArray = dimension > 0;
    this.constantPool = constantPool;
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.javaFieldName = fieldName;
}
 
Example #9
Source File: SettingDescriptor.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
SettingDescriptor(Type type, String name, String defaultValue, List<AnnotationElement> annotations) {
    Objects.requireNonNull(annotations);
    this.name = Objects.requireNonNull(name, "Name of value descriptor can't be null");
    this.type = Objects.requireNonNull(type);
    this.annotationConstruct = new AnnotationConstruct(annotations);
    this.defaultValue = Objects.requireNonNull(defaultValue);
}