private static void setMethodDefaultValue(MethodNode mn, Method m) { Object defaultValue = m.getDefaultValue(); ConstantExpression cExp = ConstantExpression.NULL; if (defaultValue!=null) cExp = new ConstantExpression(defaultValue); mn.setCode(new ReturnStatement(cExp)); mn.setAnnotationDefault(true); }
result.setAnnotationDefault(true); } else {
private MethodNode copyMethod(MethodNode method, String newName) { // can't hurt to set return type to void MethodNode newMethod = new MethodNode(newName, method.getModifiers(), ClassHelper.VOID_TYPE, method.getParameters(), method.getExceptions(), method.getCode()); newMethod.addAnnotations(method.getAnnotations()); newMethod.setSynthetic(method.isSynthetic()); newMethod.setDeclaringClass(method.getDeclaringClass()); newMethod.setSourcePosition(method); newMethod.setVariableScope(method.getVariableScope()); newMethod.setGenericsTypes(method.getGenericsTypes()); newMethod.setAnnotationDefault(method.hasAnnotationDefault()); return newMethod; }
methodNode.addAnnotations(annotations); methodNode.setGenericsTypes(generics); methodNode.setAnnotationDefault(hasAnnotationDefault); methodNode.setSyntheticPublic(syntheticPublic); configureAST(methodNode, methodDef);
private void setMethodDefaultValue(MethodNode mn, Method m) { Object defaultValue = m.getDefaultValue(); ConstantExpression cExp = ConstantExpression.NULL; if (defaultValue!=null) cExp = new ConstantExpression(defaultValue); mn.setCode(new ReturnStatement(cExp)); mn.setAnnotationDefault(true); }
private void setMethodDefaultValue(MethodNode mn, Method m) { Object defaultValue = m.getDefaultValue(); mn.setCode(new ReturnStatement(new ConstantExpression(defaultValue))); mn.setAnnotationDefault(true); }
private void setMethodDefaultValue(MethodNode mn, Method m) { Object defaultValue = m.getDefaultValue(); mn.setCode(new ReturnStatement(new ConstantExpression(defaultValue))); mn.setAnnotationDefault(true); }
methodNode.addAnnotations(annotations); methodNode.setGenericsTypes(generics); methodNode.setAnnotationDefault(hasAnnotationDefault); configureAST(methodNode, methodDef);
methodNode.addAnnotations(annotations); methodNode.setGenericsTypes(generics); methodNode.setAnnotationDefault(hasAnnotationDefault); configureAST(methodNode, methodDef);
methodNode.addAnnotations(annotations); methodNode.setGenericsTypes(generics); methodNode.setAnnotationDefault(hasAnnotationDefault); methodNode.setSyntheticPublic(syntheticPublic); configureAST(methodNode, methodDef);