本文整理匯總了Java中jdk.vm.ci.meta.ResolvedJavaMethod.isAbstract方法的典型用法代碼示例。如果您正苦於以下問題:Java ResolvedJavaMethod.isAbstract方法的具體用法?Java ResolvedJavaMethod.isAbstract怎麽用?Java ResolvedJavaMethod.isAbstract使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類jdk.vm.ci.meta.ResolvedJavaMethod
的用法示例。
在下文中一共展示了ResolvedJavaMethod.isAbstract方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: checkTargetConditionsHelper
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
private String checkTargetConditionsHelper(ResolvedJavaMethod method, int invokeBci) {
OptionValues options = rootGraph.getOptions();
if (method == null) {
return "the method is not resolved";
} else if (method.isNative() && (!Intrinsify.getValue(options) || !InliningUtil.canIntrinsify(context.getReplacements(), method, invokeBci))) {
return "it is a non-intrinsic native method";
} else if (method.isAbstract()) {
return "it is an abstract method";
} else if (!method.getDeclaringClass().isInitialized()) {
return "the method's class is not initialized";
} else if (!method.canBeInlined()) {
return "it is marked non-inlinable";
} else if (countRecursiveInlining(method) > MaximumRecursiveInlining.getValue(options)) {
return "it exceeds the maximum recursive inlining depth";
} else {
if (new OptimisticOptimizations(rootGraph.getProfilingInfo(method), options).lessOptimisticThan(context.getOptimisticOptimizations())) {
return "the callee uses less optimistic optimizations than caller";
} else {
return null;
}
}
}
示例2: getCodeTest
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
/**
* @see ResolvedJavaMethod#getCode()
*/
@Test
public void getCodeTest() {
for (Map.Entry<Method, ResolvedJavaMethod> e : methods.entrySet()) {
ResolvedJavaMethod m = e.getValue();
byte[] code = m.getCode();
if (code == null) {
assertTrue(m.getCodeSize() == 0);
} else {
if (m.isAbstract()) {
assertTrue(code.length == 0);
} else if (!m.isNative()) {
assertTrue(code.length > 0);
}
}
}
}
示例3: process
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
@Override
protected void process() {
if (callTarget.invokeKind().isDirect()) {
/* Static and special calls: link the statically known callee method. */
linkCallee(callTarget.targetMethod());
} else {
/* Virtual and interface call: Iterate all receiver types. */
for (ResolvedJavaType type : getTypes()) {
/*
* Resolve the method call for one exact receiver type. The method linking
* semantics of Java are complicated, but fortunatley we can use the linker of
* the hosting Java VM. The Graal API exposes this functionality.
*/
ResolvedJavaMethod method = type.resolveConcreteMethod(callTarget.targetMethod(), callTarget.invoke().getContextType());
/*
* Since the static analysis is conservative, the list of receiver types can
* contain types that actually do not provide the method to be called. Ignore
* these.
*/
if (method != null && !method.isAbstract()) {
linkCallee(method);
}
}
}
super.process();
}
示例4: getCodeSizeTest
import jdk.vm.ci.meta.ResolvedJavaMethod; //導入方法依賴的package包/類
/**
* @see ResolvedJavaMethod#getCodeSize()
*/
@Test
public void getCodeSizeTest() {
for (Map.Entry<Method, ResolvedJavaMethod> e : methods.entrySet()) {
ResolvedJavaMethod m = e.getValue();
int codeSize = m.getCodeSize();
if (m.isAbstract()) {
assertTrue(codeSize == 0);
} else if (!m.isNative()) {
assertTrue(codeSize > 0);
}
}
}