當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。