Java Code Examples for org.codehaus.groovy.ast.MethodNode#getNodeMetaData()
The following examples show how to use
org.codehaus.groovy.ast.MethodNode#getNodeMetaData() .
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: AbstractFunctionalInterfaceWriter.java From groovy with Apache License 2.0 | 6 votes |
default Object[] createBootstrapMethodArguments(String abstractMethodDesc, int insn, ClassNode methodOwnerClassNode, MethodNode methodNode, boolean serializable) { Parameter[] parameters = methodNode.getNodeMetaData(ORIGINAL_PARAMETERS_WITH_EXACT_TYPE); List<Object> argumentList = new LinkedList<>(); argumentList.add(Type.getType(abstractMethodDesc)); argumentList.add( new Handle( insn, BytecodeHelper.getClassInternalName(methodOwnerClassNode.getName()), methodNode.getName(), BytecodeHelper.getMethodDescriptor(methodNode), methodOwnerClassNode.isInterface() ) ); argumentList.add(Type.getType(BytecodeHelper.getMethodDescriptor(methodNode.getReturnType(), parameters))); if (serializable) { argumentList.add(5); argumentList.add(0); } return argumentList.toArray(); }
Example 2
Source File: StaticTypesWriterController.java From groovy with Apache License 2.0 | 5 votes |
@Override public CallSiteWriter getCallSiteWriter() { MethodNode methodNode = getMethodNode(); if (methodNode !=null && methodNode.getNodeMetaData(StaticTypesMarker.DYNAMIC_RESOLUTION)==Boolean.TRUE) { return super.getCallSiteWriter(); } if (isInStaticallyCheckedMethod) { return callSiteWriter; } return super.getCallSiteWriter(); }
Example 3
Source File: NullCheckASTTransformation.java From groovy with Apache License 2.0 | 4 votes |
private static boolean isMarkedAsProcessed(MethodNode mn) { Boolean r = mn.getNodeMetaData(NULL_CHECK_IS_PROCESSED); return null != r && r; }