match(method(Method.GET), matchesUri(new Regexp("/api/endpoint/[0-9]+/bla")))
List<Object> objectList = new ArrayList<Object>(); objectList.addAll(Arrays.asList(0,"sfsd",2,3.14,new Regexp("Test"))); for(Object object:objectList) { System.out.println(object); }
@Override public Operand getSimplifiedOperand(Map<Operand, Operand> valueMap, boolean force) { Operand newRegexp = regexp.getSimplifiedOperand(valueMap, force); return newRegexp == regexp ? this : new Regexp(newRegexp, options); }
@Override public Operand getSimplifiedOperand(Map<Operand, Operand> valueMap, boolean force) { Operand newRegexp = regexp.getSimplifiedOperand(valueMap, force); return newRegexp == regexp ? this : new Regexp(newRegexp, options); }
@Override public Operand cloneForInlining(InlinerInfo ii) { return hasKnownValue() ? this : new Regexp(regexp.cloneForInlining(ii), options); }
@Override public Operand cloneForInlining(InlinerInfo ii) { return hasKnownValue() ? this : new Regexp(regexp.cloneForInlining(ii), options); }
public Operand buildRegexp(RegexpNode reNode) { // SSS FIXME: Rather than throw syntax error at runtime, we should detect // regexp syntax errors at build time and add an exception-throwing instruction instead return copyAndReturnValue(new Regexp(reNode.getValue(), reNode.getOptions())); }
public Operand buildRegexp(RegexpNode reNode) { // SSS FIXME: Rather than throw syntax error at runtime, we should detect // regexp syntax errors at build time and add an exception-throwing instruction instead return copyAndReturnValue(new Regexp(reNode.getValue(), reNode.getOptions())); }
public static Regexp decode(IRReaderDecoder d) { return new Regexp(d.decodeByteList(), RegexpOptions.fromEmbeddedOptions(d.decodeInt())); }
public static Regexp decode(IRReaderDecoder d) { return new Regexp(d.decodeByteList(), RegexpOptions.fromEmbeddedOptions(d.decodeInt())); }
public Operand buildDRegexp(DRegexpNode dregexpNode, IRScope s) { List<Operand> strPieces = new ArrayList<Operand>(); for (Node n : dregexpNode.childNodes()) { strPieces.add(dynamicPiece(n, s)); } return copyAndReturnValue(s, new Regexp(new CompoundString(strPieces), dregexpNode.getOptions())); }
public Operand buildDRegexp(DRegexpNode dregexpNode, IRScope s) { List<Operand> strPieces = new ArrayList<Operand>(); for (Node n : dregexpNode.childNodes()) { strPieces.add(dynamicPiece(n, s)); } return copyAndReturnValue(s, new Regexp(new CompoundString(strPieces), dregexpNode.getOptions())); }
public Operand buildRegexp(RegexpNode reNode, IRScope s) { return copyAndReturnValue(s, new Regexp(new StringLiteral(reNode.getValue()), reNode.getOptions())); }
public Operand buildRegexp(RegexpNode reNode, IRScope s) { return copyAndReturnValue(s, new Regexp(new StringLiteral(reNode.getValue()), reNode.getOptions())); }
@Override public void BuildDynRegExpInstr(BuildDynRegExpInstr instr) { final IRBytecodeAdapter m = jvmMethod(); if (instr.getOptions().isOnce() && instr.getRegexp() != null) { visit(new Regexp(instr.getRegexp().source().convertToString().getByteList(), instr.getOptions())); jvmStoreLocal(instr.getResult()); return; } RegexpOptions options = instr.getOptions(); final Operand[] operands = instr.getPieces(); Runnable r = new Runnable() { @Override public void run() { m.loadContext(); for (int i = 0; i < operands.length; i++) { Operand operand = operands[i]; visit(operand); } } }; m.pushDRegexp(r, options, operands.length); jvmStoreLocal(instr.getResult()); }
@Override public void BuildDynRegExpInstr(BuildDynRegExpInstr instr) { final IRBytecodeAdapter m = jvmMethod(); if (instr.getOptions().isOnce() && instr.getRegexp() != null) { visit(new Regexp(instr.getRegexp().source().convertToString().getByteList(), instr.getOptions())); jvmStoreLocal(instr.getResult()); return; } RegexpOptions options = instr.getOptions(); final Operand[] operands = instr.getPieces(); Runnable r = new Runnable() { @Override public void run() { m.loadContext(); for (int i = 0; i < operands.length; i++) { Operand operand = operands[i]; visit(operand); } } }; m.pushDRegexp(r, options, operands.length); jvmStoreLocal(instr.getResult()); }