Examples of escape()

@param string the literal string to be escaped @return the escaped form of {@code string} @throws NullPointerException if {@code string} is null @throws IllegalArgumentException if {@code string} contains badly formed UTF-16 or cannot beescaped for any other reason
  • com.google.common.escape.UnicodeEscaper.escape()
    Returns the escaped form of the given Unicode code point, or {@code null}if this code point does not need to be escaped. When called as part of an escaping operation, the given code point is guaranteed to be in the range {@code 0 <= cp <= Character#MAX_CODE_POINT}.

    If an empty array is returned, this effectively strips the input character from the resulting text.

    If the character does not need to be escaped, this method should return {@code null}, rather than an array containing the character representation of the code point. This enables the escaping algorithm to perform more efficiently.

    If the implementation of this method cannot correctly handle a particular code point then it should either throw an appropriate runtime exception or return a suitable replacement character. It must never silently discard invalid input as this may constitute a security risk. @param cp the Unicode code point to escape if necessary @return the replacement characters, or {@code null} if no escaping wasneeded

  • com.google.template.soy.internal.base.CharEscaper.escape()
    Returns the escaped form of a given literal string. @param string the literal string to be escaped @return the escaped form of {@code string} @throws NullPointerException if {@code string} is null
  • org.apache.lucene.queryParser.MultiFieldQueryParserSettings.escape()
  • org.apache.lucene.queryParser.QueryParserSettings.escape()
  • org.apache.lucene.queryparser.classic.QueryParserSettings.escape()
  • org.crsh.cli.impl.Delimiter.escape()
  • org.eclipse.persistence.internal.oxm.CharacterEscapeHandler.escape()

    Perform character escaping and write the result to the output.

    Note: This feature is not supported when marshalling to the following targets:

    @param buffer Array of characters to be escaped @param start The starting position @param length The number of characters being escaped @param isAttributeValue A value of 'true' indicates this is an attribute value @param out The resulting escaped characters will be written to this Writer @throws IOException In an error condition, IOException can be thrown to stop the marshalling process
  • org.eclipse.persistence.oxm.CharacterEscapeHandler.escape()

    Perform character escaping and write the result to the output.

    Note: This feature is not supported when marshalling to the following targets:

    @param buffer Array of characters to be escaped @param start The starting position @param length The number of characters being escaped @param isAttributeValue A value of 'true' indicates this is an attribute value @param out The resulting escaped characters will be written to this Writer @throws IOException In an error condition, IOException can be thrown to stop the marshalling process
  • org.jmol.script.ScriptVariable.escape()
  • org.jruby.runtime.Block.escape()
  • org.rythmengine.extension.ICodeType.escape()
    Return escape scheme @return escape
  • org.waveprotocol.wave.util.escapers.PercentEscaper.escape()

  • Examples of com.google.common.escape.UnicodeEscaper.escape()

      }

      /** Tests that if specify '%' as safe the result is an idempotent escaper. */
      public void testCustomEscaper_withpercent() {
        UnicodeEscaper e = new PercentEscaper("%", false);
        assertEquals("foo%7Cbar", e.escape("foo|bar"));
        assertEquals("foo%7Cbar", e.escape("foo%7Cbar"))// idempotent
      }

      /**
       * Test that giving a null 'safeChars' string causes a
    View Full Code Here

    Examples of com.google.common.escape.UnicodeEscaper.escape()

      /** Tests that if specify '%' as safe the result is an idempotent escaper. */
      public void testCustomEscaper_withpercent() {
        UnicodeEscaper e = new PercentEscaper("%", false);
        assertEquals("foo%7Cbar", e.escape("foo|bar"));
        assertEquals("foo%7Cbar", e.escape("foo%7Cbar"))// idempotent
      }

      /**
       * Test that giving a null 'safeChars' string causes a
       * {@link NullPointerException}.
    View Full Code Here

    Examples of com.google.template.soy.internal.base.CharEscaper.escape()

          // Source.
          ilb.appendLineStart("<source>");
          for (SoyMsgPart msgPart : msg.getParts()) {
            if (msgPart instanceof SoyMsgRawTextPart) {
              String rawText = ((SoyMsgRawTextPart) msgPart).getRawText();
              ilb.append(contentEscaper.escape(rawText));
            } else {
              String placeholderName = ((SoyMsgPlaceholderPart) msgPart).getPlaceholderName();
              ilb.appendParts("<x id=\"", attributeEscaper.escape(placeholderName), "\"/>");
            }
          }
    View Full Code Here

    Examples of com.google.template.soy.internal.base.CharEscaper.escape()

          // Description and meaning.
          String desc = msg.getDesc();
          if (desc != null && desc.length() > 0) {
            ilb.appendLine(
                "<note priority=\"1\" from=\"description\">", contentEscaper.escape(desc), "</note>");
          }
          String meaning = msg.getMeaning();
          if (meaning != null && meaning.length() > 0) {
            ilb.appendLine(
                "<note priority=\"1\" from=\"meaning\">", contentEscaper.escape(meaning), "</note>");
    View Full Code Here

    Examples of com.google.template.soy.internal.base.CharEscaper.escape()

                "<note priority=\"1\" from=\"description\">", contentEscaper.escape(desc), "</note>");
          }
          String meaning = msg.getMeaning();
          if (meaning != null && meaning.length() > 0) {
            ilb.appendLine(
                "<note priority=\"1\" from=\"meaning\">", contentEscaper.escape(meaning), "</note>");
          }

          // End 'trans-unit'.
          ilb.decreaseIndent();
          ilb.appendLine("</trans-unit>");
    View Full Code Here

    Examples of org.apache.lucene.queryParser.MultiFieldQueryParserSettings.escape()

            }
            if (qpSettings.analyzer() == null) {
                qpSettings.analyzer(parseContext.mapperService().searchAnalyzer());
            }

            if (qpSettings.escape()) {
                qpSettings.queryString(org.apache.lucene.queryParser.QueryParser.escape(qpSettings.queryString()));
            }

            Query query = parseContext.indexCache().queryParserCache().get(qpSettings);
            if (query != null) {
    View Full Code Here

    Examples of org.apache.lucene.queryParser.MultiFieldQueryParserSettings.escape()

                    } else if ("lowercase_expanded_terms".equals(currentFieldName) || "lowercaseExpandedTerms".equals(currentFieldName)) {
                        qpSettings.lowercaseExpandedTerms(parser.booleanValue());
                    } else if ("enable_position_increments".equals(currentFieldName) || "enablePositionIncrements".equals(currentFieldName)) {
                        qpSettings.enablePositionIncrements(parser.booleanValue());
                    } else if ("escape".equals(currentFieldName)) {
                        qpSettings.escape(parser.booleanValue());
                    } else if ("use_dis_max".equals(currentFieldName) || "useDisMax".equals(currentFieldName)) {
                        qpSettings.useDisMax(parser.booleanValue());
                    } else if ("fuzzy_prefix_length".equals(currentFieldName) || "fuzzyPrefixLength".equals(currentFieldName)) {
                        qpSettings.fuzzyPrefixLength(parser.intValue());
                    } else if ("phrase_slop".equals(currentFieldName) || "phraseSlop".equals(currentFieldName)) {
    View Full Code Here

    Examples of org.apache.lucene.queryParser.QueryParserSettings.escape()

                        } else if ("fuzzy_min_sim".equals(currentFieldName) || "fuzzyMinSim".equals(currentFieldName)) {
                            qpSettings.fuzzyMinSim(parser.floatValue());
                        } else if ("fuzzy_prefix_length".equals(currentFieldName) || "fuzzyPrefixLength".equals(currentFieldName)) {
                            qpSettings.fuzzyPrefixLength(parser.intValue());
                        } else if ("escape".equals(currentFieldName)) {
                            qpSettings.escape(parser.booleanValue());
                        } else if ("analyze_wildcard".equals(currentFieldName) || "analyzeWildcard".equals(currentFieldName)) {
                            qpSettings.analyzeWildcard(parser.booleanValue());
                        } else if ("rewrite".equals(currentFieldName)) {
                            qpSettings.rewriteMethod(QueryParsers.parseRewriteMethod(parser.textOrNull()));
                        }
    View Full Code Here

    Examples of org.apache.lucene.queryParser.QueryParserSettings.escape()

            if (qpSettings.queryString() == null) {
                throw new QueryParsingException(parseContext.index(), "No value specified for term query");
            }

            if (qpSettings.escape()) {
                qpSettings.queryString(org.apache.lucene.queryParser.QueryParser.escape(qpSettings.queryString()));
            }

            Query query = parseContext.indexCache().queryParserCache().get(qpSettings);
            if (query != null) {
    View Full Code Here

    Examples of org.apache.lucene.queryparser.classic.QueryParserSettings.escape()

                    } else if ("lowercase_expanded_terms".equals(currentFieldName) || "lowercaseExpandedTerms".equals(currentFieldName)) {
                        qpSettings.lowercaseExpandedTerms(parser.booleanValue());
                    } else if ("enable_position_increments".equals(currentFieldName) || "enablePositionIncrements".equals(currentFieldName)) {
                        qpSettings.enablePositionIncrements(parser.booleanValue());
                    } else if ("escape".equals(currentFieldName)) {
                        qpSettings.escape(parser.booleanValue());
                    } else if ("use_dis_max".equals(currentFieldName) || "useDisMax".equals(currentFieldName)) {
                        qpSettings.useDisMax(parser.booleanValue());
                    } else if ("fuzzy_prefix_length".equals(currentFieldName) || "fuzzyPrefixLength".equals(currentFieldName)) {
                        qpSettings.fuzzyPrefixLength(parser.intValue());
                    } else if ("fuzzy_max_expansions".equals(currentFieldName) || "fuzzyMaxExpansions".equals(currentFieldName)) {
    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.