Examples of Substitution


Examples of com.alibaba.citrus.util.regex.Substitution

        substName = defaultIfNull(substName, DEFAULT_SUBSTITUTION_NAME);
    }

    public void invoke(PipelineContext pipelineContext) throws Exception {
        TurbineRunData rundata = getTurbineRunData(request);
        Substitution subst = getSubstitution(pipelineContext);

        String resourceName;

        if (subst != null && this.resourceName != null) {
            resourceName = trimToNull(subst.substitute(this.resourceName));
        } else {
            resourceName = ServletUtil.getResourcePath(rundata.getRequest());
        }

        try {
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.codegen.Naming.Substitution

       
        // The variable holding the result for the code inside the code block
        JCVariableDecl decl2 = at(isCase).VarDef(make().Modifiers(FINAL), substVarName, toTypeExpr, tmpVarExpr);

        // Prepare for variable substitution in the following code block
        Substitution prevSubst = naming.addVariableSubst(isCase.getVariable().getDeclarationModel(), substVarName.toString());

        List<JCStatement> stats = List.<JCStatement> of(decl2);
        stats = stats.appendList(transformBlock(caseClause.getBlock()));
        JCBlock block = at(isCase).Block(0, stats);

        // Deactivate the above variable substitution
        prevSubst.close();

        last = make().If(cond, block, last);
        return last;
    }
View Full Code Here

Examples of de.tudarmstadt.langtech.substituter.Substitution

      // TWSI only operates on nouns
      if (postags.get(i).startsWith("NN"))
      {
        try
        {
          Substitution subst = sensub.getSubstitution(i, tokenArray, postagsArray);
         
          if (subst != null)
          {
            for (String[] substitution : subst.getSubstitutions())
            {
              //resultList.add(subst.getSense().replaceAll("@@", ""));
              resultList.add(substitution[0]);
            }
          }
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.Substitution

   
    InferredRel inf = new InferredRel(trigger, eff);
    infEnv.addRule(inf);
   
    RelationshipPredicate find = new RelationshipPredicate(relations[0], new SpecVar[] {new SpecVar("a"), new SpecVar("a")});
    Substitution sub = new Substitution();
    sub = sub.addSub(new SpecVar("a"), labels[0]);
       
    assertNull(env.getInferredDelta(find, sub));
  }
View Full Code Here

Examples of jregex.Substitution

    initReplacersD0Ds();
  }
 
  private Replacer getReplacerAmpersand()
  {
    return new jregex.Pattern("(\\p{Upper})(\\&)(\\p{Upper})").replacer(new Substitution()
    {
      @Override
      public void appendSubstitution(MatchResult match, TextBuffer dest)
      {
        dest.append(match.group(1));
View Full Code Here

Examples of net.sf.cram.encoding.read_features.Substitution

        refBase = 'N';
      else
        refBase = refBases[refCoord];

      if (bases[i + fromPosInRead] != refBase) {
        Substitution sv = new Substitution();
        sv.setPosition(oneBasedPositionInRead);
        sv.setBase(bases[i + fromPosInRead]);
        sv.setRefernceBase(refBase);
        // sv.setBaseChange(new BaseChange(sv.getRefernceBase(), sv
        // .getBase()));
        sv.setBaseChange(null);

        features.add(sv);

        if (losslessQS || noQS)
          continue;
View Full Code Here

Examples of org.apache.camel.util.component.ArgumentSubstitutionParser.Substitution

    @Test
    public void testParse() throws Exception {

        final Substitution[] adapters = new Substitution[4];
        adapters[0] = new Substitution(".+", "name", PERSON);
        adapters[1] = new Substitution("greet.+", "person([0-9]+)", "astronaut$1");
        adapters[2] = new Substitution(".+", "(.+)", "java.util.List", "$1List");
        adapters[3] = new Substitution(".+", "(.+)", ".*?(\\w++)\\[\\]", "$1Array", true);

        final ApiMethodParser<TestProxy> parser = new ArgumentSubstitutionParser<TestProxy>(TestProxy.class, adapters);

        final ArrayList<String> signatures = new ArrayList<String>();
        signatures.add("public String sayHi();");
View Full Code Here

Examples of org.apache.oro.text.regex.Substitution

  }
   

  private Any doSubstitute(Context context, Any pattern_, Any replacement, int flags)
  {
    Substitution substitution;
    if (replacement.isString()) {
      String s = replacement.toString();
      if (s.indexOf('$') != -1) {
        substitution = new Perl5Substitution(s);
      } else {
View Full Code Here

Examples of org.apache.oro.text.regex.Substitution

  }
   

  private Any doSubstitute(Context context, String string, Any replacement, int substFlags)
  {
    Substitution substitution;
    if (replacement.isString()) {
      String s = replacement.toString();
      if (s.indexOf('$') != -1) {
        substitution = new Perl5Substitution(s);
      } else {
View Full Code Here

Examples of org.apache.oro.text.regex.Substitution

            }
        }
       

        // Do the substitution
        Substitution s =
            new Perl5Substitution(subst.toString(),
                                  Perl5Substitution.INTERPOLATE_ALL);
        return Util.substitute(matcher,
                               getCompiledPattern(options),
                               s,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.