Java 类jdk.nashorn.internal.runtime.regexp.RegExpResult 实例源码

项目:OpenJSharp    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), $nasgenmap$);
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public NativeRegExpExecResult exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
int search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:openjdk-jdk10    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), $nasgenmap$);
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:openjdk-jdk10    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public NativeRegExpExecResult exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:openjdk-jdk10    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
int search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:openjdk9    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), $nasgenmap$);
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:openjdk9    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public NativeRegExpExecResult exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:openjdk9    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
int search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:kaziranga    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), $nasgenmap$);
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:kaziranga    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public NativeRegExpExecResult exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:kaziranga    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
int search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:lookaside_java-1.8.0-openjdk    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), $nasgenmap$);
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:lookaside_java-1.8.0-openjdk    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public NativeRegExpExecResult exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:lookaside_java-1.8.0-openjdk    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
int search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:jdk8u_nashorn    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), $nasgenmap$);
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:jdk8u_nashorn    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public NativeRegExpExecResult exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:jdk8u_nashorn    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
int search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:infobip-open-jdk-8    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), $nasgenmap$);
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:infobip-open-jdk-8    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public NativeRegExpExecResult exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:infobip-open-jdk-8    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
int search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:OLD-OpenJDK8    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), global.getRegExpExecResultMap());
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:OLD-OpenJDK8    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public Object exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:OLD-OpenJDK8    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
Object search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:nashorn-backport    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), global.getRegExpExecResultMap());
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:nashorn-backport    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public Object exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:nashorn-backport    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
Object search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:nashorn    文件:NativeRegExpExecResult.java   
NativeRegExpExecResult(final RegExpResult result, final Global global) {
    super(global.getArrayPrototype(), global.getRegExpExecResultMap());
    setIsArray();
    this.setArray(ArrayData.allocate(result.getGroups().clone()));
    this.index = result.getIndex();
    this.input = result.getInput();
}
项目:nashorn    文件:NativeRegExp.java   
/**
 * Executes a search for a match within a string based on a regular
 * expression. It returns an array of information or null if no match is
 * found.
 *
 * @param string String to match.
 * @return NativeArray of matches, string or null.
 */
public Object exec(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return null;
    }

    return new NativeRegExpExecResult(match, globalObject);
}
项目:nashorn    文件:NativeRegExp.java   
/**
 * Tests for a match in a string. It returns the index of the match, or -1
 * if not found.
 *
 * @param string String to match.
 * @return Index of match.
 */
Object search(final String string) {
    final RegExpResult match = execInner(string);

    if (match == null) {
        return -1;
    }

    return match.getIndex();
}
项目:OpenJSharp    文件:Global.java   
RegExpResult getLastRegExpResult() {
    return lastRegExpResult;
}
项目:OpenJSharp    文件:Global.java   
void setLastRegExpResult(final RegExpResult regExpResult) {
    this.lastRegExpResult = regExpResult;
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Getter for non-standard RegExp.input property.
 * @param self self object
 * @return last regexp input
 */
@Getter(where = Where.CONSTRUCTOR, attributes = Attribute.CONSTANT, name = "input")
public static Object getLastInput(final Object self) {
    final RegExpResult match = Global.instance().getLastRegExpResult();
    return match == null ? "" : match.getInput();
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Getter for non-standard RegExp.lastMatch property.
 * @param self self object
 * @return last regexp input
 */
@Getter(where = Where.CONSTRUCTOR, attributes = Attribute.CONSTANT, name = "lastMatch")
public static Object getLastMatch(final Object self) {
    final RegExpResult match = Global.instance().getLastRegExpResult();
    return match == null ? "" : match.getGroup(0);
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Getter for non-standard RegExp.lastParen property.
 * @param self self object
 * @return last regexp input
 */
@Getter(where = Where.CONSTRUCTOR, attributes = Attribute.CONSTANT, name = "lastParen")
public static Object getLastParen(final Object self) {
    final RegExpResult match = Global.instance().getLastRegExpResult();
    return match == null ? "" : match.getLastParen();
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Getter for non-standard RegExp.leftContext property.
 * @param self self object
 * @return last regexp input
 */
@Getter(where = Where.CONSTRUCTOR, attributes = Attribute.CONSTANT, name = "leftContext")
public static Object getLeftContext(final Object self) {
    final RegExpResult match = Global.instance().getLastRegExpResult();
    return match == null ? "" : match.getInput().substring(0, match.getIndex());
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Getter for non-standard RegExp.rightContext property.
 * @param self self object
 * @return last regexp input
 */
@Getter(where = Where.CONSTRUCTOR, attributes = Attribute.CONSTANT, name = "rightContext")
public static Object getRightContext(final Object self) {
    final RegExpResult match = Global.instance().getLastRegExpResult();
    return match == null ? "" : match.getInput().substring(match.getIndex() + match.length());
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Getter for non-standard RegExp.$1 property.
 * @param self self object
 * @return last regexp input
 */
@Getter(where = Where.CONSTRUCTOR, attributes = Attribute.CONSTANT, name = "$1")
public static Object getGroup1(final Object self) {
    final RegExpResult match = Global.instance().getLastRegExpResult();
    return match == null ? "" : match.getGroup(1);
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Getter for non-standard RegExp.$2 property.
 * @param self self object
 * @return last regexp input
 */
@Getter(where = Where.CONSTRUCTOR, attributes = Attribute.CONSTANT, name = "$2")
public static Object getGroup2(final Object self) {
    final RegExpResult match = Global.instance().getLastRegExpResult();
    return match == null ? "" : match.getGroup(2);
}
项目:OpenJSharp    文件:NativeRegExp.java   
/**
 * Getter for non-standard RegExp.$3 property.
 * @param self self object
 * @return last regexp input
 */
@Getter(where = Where.CONSTRUCTOR, attributes = Attribute.CONSTANT, name = "$3")
public static Object getGroup3(final Object self) {
    final RegExpResult match = Global.instance().getLastRegExpResult();
    return match == null ? "" : match.getGroup(3);
}