Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.cloudbees.groovy.cps.CpsStringGroovyMethods Maven / Gradle / Ivy
package com.cloudbees.groovy.cps;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Generated;
import com.cloudbees.groovy.cps.impl.Caller;
import com.cloudbees.groovy.cps.impl.CpsCallableInvocation;
import com.cloudbees.groovy.cps.impl.CpsFunction;
import groovy.lang.Closure;
import groovy.lang.GString;
import org.codehaus.groovy.runtime.InvokerHelper;
import org.codehaus.groovy.runtime.StringGroovyMethods;
import org.codehaus.groovy.runtime.callsite.BooleanClosureWrapper;
@Generated(value = "com.cloudbees.groovy.cps.tool.Translator", date = "Tue Sep 05 14:35:45 EDT 2017", comments = "based on groovy-cps-dgm-builder-1.19-jar-with-dependencies.jar")
@SuppressWarnings("rawtypes")
public class CpsStringGroovyMethods {
private CpsStringGroovyMethods() {
}
public staticT eachMatch(T self, CharSequence regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "eachMatch", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "eachMatch", self, regex, closure))) {
return StringGroovyMethods.eachMatch(self, regex, closure);
}
return CpsStringGroovyMethods.$eachMatch__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(self, regex, closure);
}
private staticT $eachMatch__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(T self, CharSequence regex, Closure closure) {
Builder b = new Builder(loc("eachMatch")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.staticCall(703, CpsStringGroovyMethods.class, "$eachMatch__java_lang_String__java_lang_String__groovy_lang_Closure", b.functionCall(703, b.localVariable("self"), "toString"), b.functionCall(703, b.localVariable("regex"), "toString"), b.localVariable("closure")), b.return_(b.localVariable("self"))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public staticT eachMatch(T self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "eachMatch", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "eachMatch", self, pattern, closure))) {
return StringGroovyMethods.eachMatch(self, pattern, closure);
}
return CpsStringGroovyMethods.$eachMatch__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private staticT $eachMatch__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(T self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("eachMatch")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.staticCall(721, CpsStringGroovyMethods.class, "$eachMatch__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure", b.functionCall(721, b.localVariable("self"), "toString"), b.localVariable("pattern"), b.localVariable("closure")), b.return_(b.localVariable("self"))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public static String eachMatch(String self, String regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "eachMatch", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "eachMatch", self, regex, closure))) {
return StringGroovyMethods.eachMatch(self, regex, closure);
}
return CpsStringGroovyMethods.$eachMatch__java_lang_String__java_lang_String__groovy_lang_Closure(self, regex, closure);
}
private static String $eachMatch__java_lang_String__java_lang_String__groovy_lang_Closure(String self, String regex, Closure closure) {
Builder b = new Builder(loc("eachMatch")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(756, CpsStringGroovyMethods.class, "$eachMatch__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure", b.localVariable("self"), b.functionCall(756, b.constant(Pattern.class), "compile", b.localVariable("regex")), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public static String eachMatch(String self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "eachMatch", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "eachMatch", self, pattern, closure))) {
return StringGroovyMethods.eachMatch(self, pattern, closure);
}
return CpsStringGroovyMethods.$eachMatch__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private static String $eachMatch__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(String self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("eachMatch")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.declareVariable(738, Matcher.class, "m", b.functionCall(738, b.localVariable("pattern"), "matcher", b.localVariable("self"))), b.functionCall(739, b.constant(CpsDefaultGroovyMethods.class), "each", b.localVariable("m"), b.localVariable("closure")), b.return_(b.localVariable("self"))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public staticList findAll(CharSequence self, CharSequence regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "findAll", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "findAll", self, regex, closure))) {
return StringGroovyMethods.findAll(self, regex, closure);
}
return CpsStringGroovyMethods.$findAll__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(self, regex, closure);
}
private staticList $findAll__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(CharSequence self, CharSequence regex, Closure closure) {
Builder b = new Builder(loc("findAll")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(1086, CpsStringGroovyMethods.class, "$findAll__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure", b.localVariable("self"), b.functionCall(1086, b.constant(Pattern.class), "compile", b.functionCall(1086, b.localVariable("regex"), "toString")), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public staticList findAll(CharSequence self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "findAll", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "findAll", self, pattern, closure))) {
return StringGroovyMethods.findAll(self, pattern, closure);
}
return CpsStringGroovyMethods.$findAll__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private staticList $findAll__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(CharSequence self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("findAll")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.declareVariable(1152, Matcher.class, "matcher", b.functionCall(1152, b.localVariable("pattern"), "matcher", b.functionCall(1152, b.localVariable("self"), "toString"))), b.return_(b.functionCall(1153, b.constant(CpsDefaultGroovyMethods.class), "collect", b.localVariable("matcher"), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public staticList findAll(String self, String regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "findAll", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "findAll", self, regex, closure))) {
return StringGroovyMethods.findAll(self, regex, closure);
}
return CpsStringGroovyMethods.$findAll__java_lang_String__java_lang_String__groovy_lang_Closure(self, regex, closure);
}
private staticList $findAll__java_lang_String__java_lang_String__groovy_lang_Closure(String self, String regex, Closure closure) {
Builder b = new Builder(loc("findAll")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(1189, CpsStringGroovyMethods.class, "$findAll__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure", b.cast(1189, b.localVariable("self"), CharSequence.class, false), b.cast(1189, b.localVariable("regex"), CharSequence.class, false), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public staticList findAll(String self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "findAll", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "findAll", self, pattern, closure))) {
return StringGroovyMethods.findAll(self, pattern, closure);
}
return CpsStringGroovyMethods.$findAll__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private staticList $findAll__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(String self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("findAll")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.return_(b.staticCall(1171, CpsStringGroovyMethods.class, "$findAll__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure", b.cast(1171, b.localVariable("self"), CharSequence.class, false), b.localVariable("pattern"), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public static String find(CharSequence self, CharSequence regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "find", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "find", self, regex, closure))) {
return StringGroovyMethods.find(self, regex, closure);
}
return CpsStringGroovyMethods.$find__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(self, regex, closure);
}
private static String $find__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(CharSequence self, CharSequence regex, Closure closure) {
Builder b = new Builder(loc("find")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(886, CpsStringGroovyMethods.class, "$find__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure", b.localVariable("self"), b.functionCall(886, b.constant(Pattern.class), "compile", b.functionCall(886, b.localVariable("regex"), "toString")), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public static String find(CharSequence self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "find", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "find", self, pattern, closure))) {
return StringGroovyMethods.find(self, pattern, closure);
}
return CpsStringGroovyMethods.$find__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private static String $find__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(CharSequence self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("find")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.declareVariable(981, Matcher.class, "matcher", b.functionCall(981, b.localVariable("pattern"), "matcher", b.functionCall(981, b.localVariable("self"), "toString"))), b.if_(b.functionCall(982, b.localVariable("matcher"), "find"), b.block(b.if_(b.staticCall(983, StringGroovyMethods.class, "hasGroup", b.localVariable("matcher")), b.block(b.declareVariable(984, int.class, "count", b.functionCall(984, b.localVariable("matcher"), "groupCount")), b.declareVariable(985, List.class, "groups", b.new_(985, ArrayList.class, b.localVariable("count"))), b.forLoop(null, b.sequence(b.declareVariable(986, int.class, "i", b.constant(0))), b.lessThanEqual(986, b.localVariable("i"), b.localVariable("count")), b.sequence(b.postfixInc(986, b.localVariable("i"))), b.block(b.functionCall(987, b.localVariable("groups"), "add", b.functionCall(987, b.localVariable("matcher"), "group", b.localVariable("i"))))), b.return_(b.functionCall(989, b.constant(InvokerHelper.class), "toString", b.functionCall(989, b.localVariable("closure"), "call", b.localVariable("groups"))))), b.block(b.return_(b.functionCall(991, b.constant(InvokerHelper.class), "toString", b.functionCall(991, b.localVariable("closure"), "call", b.functionCall(991, b.localVariable("matcher"), "group", b.constant(0))))))))), b.return_(b.constant(null))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public static String find(String self, String regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "find", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "find", self, regex, closure))) {
return StringGroovyMethods.find(self, regex, closure);
}
return CpsStringGroovyMethods.$find__java_lang_String__java_lang_String__groovy_lang_Closure(self, regex, closure);
}
private static String $find__java_lang_String__java_lang_String__groovy_lang_Closure(String self, String regex, Closure closure) {
Builder b = new Builder(loc("find")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(1030, CpsStringGroovyMethods.class, "$find__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure", b.cast(1030, b.localVariable("self"), CharSequence.class, false), b.cast(1030, b.localVariable("regex"), CharSequence.class, false), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public static String find(String self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "find", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "find", self, pattern, closure))) {
return StringGroovyMethods.find(self, pattern, closure);
}
return CpsStringGroovyMethods.$find__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private static String $find__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(String self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("find")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.return_(b.staticCall(1012, CpsStringGroovyMethods.class, "$find__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure", b.cast(1012, b.localVariable("self"), CharSequence.class, false), b.localVariable("pattern"), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
static String getReplacement(Matcher matcher, Closure closure) {
return CpsStringGroovyMethods.$getReplacement__java_util_regex_Matcher__groovy_lang_Closure(matcher, closure);
}
private static String $getReplacement__java_util_regex_Matcher__groovy_lang_Closure(Matcher matcher, Closure closure) {
Builder b = new Builder(loc("getReplacement")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("matcher", "closure"), b.block(b.if_(b.not(1546, b.staticCall(1546, StringGroovyMethods.class, "hasGroup", b.localVariable("matcher"))), b.block(b.return_(b.functionCall(1547, b.constant(InvokerHelper.class), "toString", b.functionCall(1547, b.localVariable("closure"), "call", b.functionCall(1547, b.localVariable("matcher"), "group")))))), b.declareVariable(1550, int.class, "count", b.functionCall(1550, b.localVariable("matcher"), "groupCount")), b.declareVariable(1551, List.class, "groups", b.new_(1551, ArrayList.class)), b.forLoop(null, b.sequence(b.declareVariable(1552, int.class, "i", b.constant(0))), b.lessThanEqual(1552, b.localVariable("i"), b.localVariable("count")), b.sequence(b.postfixInc(1552, b.localVariable("i"))), b.block(b.functionCall(1553, b.localVariable("groups"), "add", b.functionCall(1553, b.localVariable("matcher"), "group", b.localVariable("i"))))), b.if_(b.logicalAnd(1556, b.compareEqual(1556, b.property(1556, b.functionCall(1556, b.localVariable("closure"), "getParameterTypes"), "length"), b.constant(1)), b.compareEqual(1557, b.array(1557, b.functionCall(1557, b.localVariable("closure"), "getParameterTypes"), b.constant(0)), b.property(1557, b.constant(Object.class), "class"))), b.block(b.return_(b.functionCall(1558, b.constant(InvokerHelper.class), "toString", b.functionCall(1558, b.localVariable("closure"), "call", b.functionCall(1558, b.localVariable("groups"), "toArray")))))), b.return_(b.functionCall(1560, b.constant(InvokerHelper.class), "toString", b.functionCall(1560, b.localVariable("closure"), "call", b.localVariable("groups"))))));
throw new CpsCallableInvocation(f, null, matcher, closure);
}
public static String replaceAll(CharSequence self, CharSequence regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "replaceAll", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "replaceAll", self, regex, closure))) {
return StringGroovyMethods.replaceAll(self, regex, closure);
}
return CpsStringGroovyMethods.$replaceAll__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(self, regex, closure);
}
private static String $replaceAll__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(CharSequence self, CharSequence regex, Closure closure) {
Builder b = new Builder(loc("replaceAll")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(2504, CpsStringGroovyMethods.class, "$replaceAll__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure", b.localVariable("self"), b.functionCall(2504, b.constant(Pattern.class), "compile", b.functionCall(2504, b.localVariable("regex"), "toString")), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public static String replaceAll(CharSequence self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "replaceAll", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "replaceAll", self, pattern, closure))) {
return StringGroovyMethods.replaceAll(self, pattern, closure);
}
return CpsStringGroovyMethods.$replaceAll__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private static String $replaceAll__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(CharSequence self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("replaceAll")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.declareVariable(2573, String.class, "s", b.functionCall(2573, b.localVariable("self"), "toString")), b.declareVariable(2574, Matcher.class, "matcher", b.functionCall(2574, b.localVariable("pattern"), "matcher", b.localVariable("s"))), b.if_(b.functionCall(2575, b.localVariable("matcher"), "find"), b.block(b.declareVariable(2576, StringBuffer.class, "sb", b.new_(2576, StringBuffer.class, b.plus(2576, b.functionCall(2576, b.localVariable("s"), "length"), b.constant(16)))), b.doWhile(null, b.block(b.declareVariable(2578, String.class, "replacement", b.staticCall(2578, CpsStringGroovyMethods.class, "$getReplacement__java_util_regex_Matcher__groovy_lang_Closure", b.localVariable("matcher"), b.localVariable("closure"))), b.functionCall(2579, b.localVariable("matcher"), "appendReplacement", b.localVariable("sb"), b.functionCall(2579, b.constant(Matcher.class), "quoteReplacement", b.localVariable("replacement")))), b.functionCall(2580, b.localVariable("matcher"), "find")), b.functionCall(2581, b.localVariable("matcher"), "appendTail", b.localVariable("sb")), b.return_(b.functionCall(2582, b.localVariable("sb"), "toString"))), b.block(b.return_(b.localVariable("s"))))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public static String replaceAll(String self, String regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "replaceAll", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "replaceAll", self, regex, closure))) {
return StringGroovyMethods.replaceAll(self, regex, closure);
}
return CpsStringGroovyMethods.$replaceAll__java_lang_String__java_lang_String__groovy_lang_Closure(self, regex, closure);
}
private static String $replaceAll__java_lang_String__java_lang_String__groovy_lang_Closure(String self, String regex, Closure closure) {
Builder b = new Builder(loc("replaceAll")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(2612, CpsStringGroovyMethods.class, "$replaceAll__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure", b.cast(2612, b.localVariable("self"), CharSequence.class, false), b.cast(2612, b.localVariable("regex"), CharSequence.class, false), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public static String replaceAll(String self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "replaceAll", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "replaceAll", self, pattern, closure))) {
return StringGroovyMethods.replaceAll(self, pattern, closure);
}
return CpsStringGroovyMethods.$replaceAll__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private static String $replaceAll__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(String self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("replaceAll")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.return_(b.staticCall(2594, CpsStringGroovyMethods.class, "$replaceAll__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure", b.cast(2594, b.localVariable("self"), CharSequence.class, false), b.localVariable("pattern"), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public static String replaceFirst(CharSequence self, CharSequence regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "replaceFirst", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "replaceFirst", self, regex, closure))) {
return StringGroovyMethods.replaceFirst(self, regex, closure);
}
return CpsStringGroovyMethods.$replaceFirst__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(self, regex, closure);
}
private static String $replaceFirst__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure(CharSequence self, CharSequence regex, Closure closure) {
Builder b = new Builder(loc("replaceFirst")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(2652, CpsStringGroovyMethods.class, "$replaceFirst__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure", b.localVariable("self"), b.functionCall(2652, b.constant(Pattern.class), "compile", b.functionCall(2652, b.localVariable("regex"), "toString")), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public static String replaceFirst(CharSequence self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "replaceFirst", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "replaceFirst", self, pattern, closure))) {
return StringGroovyMethods.replaceFirst(self, pattern, closure);
}
return CpsStringGroovyMethods.$replaceFirst__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private static String $replaceFirst__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure(CharSequence self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("replaceFirst")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.declareVariable(2700, String.class, "s", b.functionCall(2700, b.localVariable("self"), "toString")), b.declareVariable(2701, Matcher.class, "matcher", b.functionCall(2701, b.localVariable("pattern"), "matcher", b.localVariable("s"))), b.if_(b.functionCall(2702, b.localVariable("matcher"), "find"), b.block(b.declareVariable(2703, StringBuffer.class, "sb", b.new_(2703, StringBuffer.class, b.plus(2703, b.functionCall(2703, b.localVariable("s"), "length"), b.constant(16)))), b.declareVariable(2704, String.class, "replacement", b.staticCall(2704, CpsStringGroovyMethods.class, "$getReplacement__java_util_regex_Matcher__groovy_lang_Closure", b.localVariable("matcher"), b.localVariable("closure"))), b.functionCall(2705, b.localVariable("matcher"), "appendReplacement", b.localVariable("sb"), b.functionCall(2705, b.constant(Matcher.class), "quoteReplacement", b.localVariable("replacement"))), b.functionCall(2706, b.localVariable("matcher"), "appendTail", b.localVariable("sb")), b.return_(b.functionCall(2707, b.localVariable("sb"), "toString"))), b.block(b.return_(b.localVariable("s"))))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public static String replaceFirst(String self, String regex, Closure closure) {
if ((!Caller.isAsynchronous(self, "replaceFirst", regex, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "replaceFirst", self, regex, closure))) {
return StringGroovyMethods.replaceFirst(self, regex, closure);
}
return CpsStringGroovyMethods.$replaceFirst__java_lang_String__java_lang_String__groovy_lang_Closure(self, regex, closure);
}
private static String $replaceFirst__java_lang_String__java_lang_String__groovy_lang_Closure(String self, String regex, Closure closure) {
Builder b = new Builder(loc("replaceFirst")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "regex", "closure"), b.block(b.return_(b.staticCall(2737, CpsStringGroovyMethods.class, "$replaceFirst__java_lang_CharSequence__java_lang_CharSequence__groovy_lang_Closure", b.cast(2737, b.localVariable("self"), CharSequence.class, false), b.cast(2737, b.localVariable("regex"), CharSequence.class, false), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, regex, closure);
}
public static String replaceFirst(String self, Pattern pattern, Closure closure) {
if ((!Caller.isAsynchronous(self, "replaceFirst", pattern, closure))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "replaceFirst", self, pattern, closure))) {
return StringGroovyMethods.replaceFirst(self, pattern, closure);
}
return CpsStringGroovyMethods.$replaceFirst__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(self, pattern, closure);
}
private static String $replaceFirst__java_lang_String__java_util_regex_Pattern__groovy_lang_Closure(String self, Pattern pattern, Closure closure) {
Builder b = new Builder(loc("replaceFirst")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "pattern", "closure"), b.block(b.return_(b.staticCall(2719, CpsStringGroovyMethods.class, "$replaceFirst__java_lang_CharSequence__java_util_regex_Pattern__groovy_lang_Closure", b.cast(2719, b.localVariable("self"), CharSequence.class, false), b.localVariable("pattern"), b.localVariable("closure")))));
throw new CpsCallableInvocation(f, null, self, pattern, closure);
}
public static String takeWhile(GString self, Closure condition) {
if ((!Caller.isAsynchronous(self, "takeWhile", condition))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "takeWhile", self, condition))) {
return StringGroovyMethods.takeWhile(self, condition);
}
return CpsStringGroovyMethods.$takeWhile__groovy_lang_GString__groovy_lang_Closure(self, condition);
}
private static String $takeWhile__groovy_lang_GString__groovy_lang_Closure(GString self, Closure condition) {
Builder b = new Builder(loc("takeWhile")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "condition"), b.block(b.return_(b.cast(3186, b.staticCall(3186, CpsStringGroovyMethods.class, "$takeWhile__java_lang_CharSequence__groovy_lang_Closure", b.functionCall(3186, b.localVariable("self"), "toString"), b.localVariable("condition")), String.class, false))));
throw new CpsCallableInvocation(f, null, self, condition);
}
public static CharSequence takeWhile(CharSequence self, Closure condition) {
if ((!Caller.isAsynchronous(self, "takeWhile", condition))&&(!Caller.isAsynchronous(CpsStringGroovyMethods.class, "takeWhile", self, condition))) {
return StringGroovyMethods.takeWhile(self, condition);
}
return CpsStringGroovyMethods.$takeWhile__java_lang_CharSequence__groovy_lang_Closure(self, condition);
}
private static CharSequence $takeWhile__java_lang_CharSequence__groovy_lang_Closure(CharSequence self, Closure condition) {
Builder b = new Builder(loc("takeWhile")).contextualize(com.cloudbees.groovy.cps.sandbox.Trusted.INSTANCE);
CpsFunction f = new CpsFunction(Arrays.asList("self", "condition"), b.block(b.declareVariable(3163, int.class, "num", b.constant(0)), b.declareVariable(3164, BooleanClosureWrapper.class, "bcw", b.new_(3164, BooleanClosureWrapper.class, b.localVariable("condition"))), b.while_(null, b.lessThan(3165, b.localVariable("num"), b.functionCall(3165, b.localVariable("self"), "length")), b.block(b.declareVariable(3166, char.class, "value", b.functionCall(3166, b.localVariable("self"), "charAt", b.localVariable("num"))), b.if_(b.functionCall(3167, b.localVariable("bcw"), "call", b.localVariable("value")), b.block(b.plusEqual(3168, b.localVariable("num"), b.constant(1))), b.block(b.break_(null))))), b.return_(b.staticCall(3173, StringGroovyMethods.class, "take", b.localVariable("self"), b.localVariable("num")))));
throw new CpsCallableInvocation(f, null, self, condition);
}
private static MethodLocation loc(String methodName) {
return new MethodLocation(CpsStringGroovyMethods.class, methodName);
}
}