当前位置: 首页>>代码示例>>Java>>正文


Java ResolvedJavaMethod.isBridge方法代码示例

本文整理汇总了Java中jdk.vm.ci.meta.ResolvedJavaMethod.isBridge方法的典型用法代码示例。如果您正苦于以下问题:Java ResolvedJavaMethod.isBridge方法的具体用法?Java ResolvedJavaMethod.isBridge怎么用?Java ResolvedJavaMethod.isBridge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jdk.vm.ci.meta.ResolvedJavaMethod的用法示例。


在下文中一共展示了ResolvedJavaMethod.isBridge方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAnnotation

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
/**
 * A helper for {@link ResolvedJavaMethod#getAnnotation(Class)} that handles the absence of
 * annotations on bridge methods where the bridged method has annotations.
 */
public static <T extends Annotation> T getAnnotation(Class<T> annotationClass, ResolvedJavaMethod method) {
    T a = method.getAnnotation(annotationClass);
    if (a == null && method.isBridge()) {
        ResolvedJavaMethod bridged = getBridgedMethod(method);
        if (bridged != null) {
            a = bridged.getAnnotation(annotationClass);
        }
    }
    return a;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:BridgeMethodUtils.java

示例2: getAnnotations

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
/**
 * A helper for {@link ResolvedJavaMethod#getAnnotations()} that handles the absence of
 * annotations on bridge methods where the bridged method has annotations.
 */
public static Annotation[] getAnnotations(ResolvedJavaMethod method) {
    Annotation[] a = method.getAnnotations();
    if (a.length == 0 && method.isBridge()) {
        ResolvedJavaMethod bridged = getBridgedMethod(method);
        if (bridged != null) {
            a = bridged.getAnnotations();
        }
    }
    return a;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:BridgeMethodUtils.java

示例3: getDeclaredAnnotations

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
/**
 * A helper for {@link ResolvedJavaMethod#getDeclaredAnnotations()} that handles the absence of
 * annotations on bridge methods where the bridged method has annotations.
 */
public static Annotation[] getDeclaredAnnotations(ResolvedJavaMethod method) {
    Annotation[] a = method.getAnnotations();
    if (a.length == 0 && method.isBridge()) {
        ResolvedJavaMethod bridged = getBridgedMethod(method);
        if (bridged != null) {
            a = bridged.getDeclaredAnnotations();
        }
    }
    return a;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:BridgeMethodUtils.java

示例4: getParameterAnnotations

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
/**
 * A helper for {@link ResolvedJavaMethod#getParameterAnnotations()} that handles the absence of
 * parameter annotations on bridge methods where the bridged method has parameter annotations.
 */
public static Annotation[][] getParameterAnnotations(ResolvedJavaMethod method) {
    Annotation[][] a = method.getParameterAnnotations();
    if (a.length == 0 && method.isBridge()) {
        ResolvedJavaMethod bridged = getBridgedMethod(method);
        if (bridged != null) {
            a = bridged.getParameterAnnotations();
        }
    }
    return a;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:BridgeMethodUtils.java

示例5: getParameterAnnotation

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
/**
 * A helper for {@link ResolvedJavaMethod#getParameterAnnotation(Class, int)} that handles the
 * absence of parameter annotations on bridge methods where the bridged method has parameter
 * annotations.
 */
public static <T extends Annotation> T getParameterAnnotation(Class<T> annotationClass, int parameterIndex, ResolvedJavaMethod method) {
    T a = method.getParameterAnnotation(annotationClass, parameterIndex);
    if (a == null && method.isBridge()) {
        ResolvedJavaMethod bridged = getBridgedMethod(method);
        if (bridged != null) {
            a = bridged.getParameterAnnotation(annotationClass, parameterIndex);
        }
    }
    return a;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:BridgeMethodUtils.java

示例6: get

import jdk.vm.ci.meta.ResolvedJavaMethod; //导入方法依赖的package包/类
InvocationPlugin get(ResolvedJavaMethod method) {
    if (resolvedRegistrations != null) {
        return resolvedRegistrations.get(method);
    } else {
        if (!method.isBridge()) {
            ResolvedJavaType declaringClass = method.getDeclaringClass();
            flushDeferrables();
            String internalName = declaringClass.getName();
            ClassPlugins classPlugins = registrations.get(internalName);
            InvocationPlugin res = null;
            if (classPlugins != null) {
                res = classPlugins.get(method);
            }
            if (res == null) {
                LateClassPlugins lcp = findLateClassPlugins(internalName);
                if (lcp != null) {
                    res = lcp.get(method);
                }
            }
            if (res != null) {
                if (canBeIntrinsified(declaringClass)) {
                    return res;
                }
            }
            if (testExtensions != null) {
                // Avoid the synchronization in the common case that there
                // are no test extensions.
                synchronized (this) {
                    if (testExtensions != null) {
                        List<Binding> bindings = testExtensions.get(internalName);
                        if (bindings != null) {
                            String name = method.getName();
                            String descriptor = method.getSignature().toMethodDescriptor();
                            for (Binding b : bindings) {
                                if (b.isStatic == method.isStatic() &&
                                                b.name.equals(name) &&
                                                descriptor.startsWith(b.argumentsDescriptor)) {
                                    return b.plugin;
                                }
                            }
                        }
                    }
                }
            }
        } else {
            // Supporting plugins for bridge methods would require including
            // the return type in the registered signature. Until needed,
            // this extra complexity is best avoided.
        }
    }
    return null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:53,代码来源:InvocationPlugins.java


注:本文中的jdk.vm.ci.meta.ResolvedJavaMethod.isBridge方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。