All files / output cl_abap_regex.clas.mjs

81.48% Statements 44/54
100% Branches 7/7
25% Functions 4/16
81.48% Lines 44/54

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 541x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 134x 134x 134x 134x 134x 134x 134x 134x 134x 134x 1x 134x 134x 134x 134x 134x 134x 134x 134x 134x 1x     1x                 1x 142x 142x 142x 142x 142x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// cl_abap_regex.clas.abap
class cl_abap_regex {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CL_ABAP_REGEX';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"PATTERN": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "MV_PATTERN": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "MV_IGNORE_CASE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "U", "is_constant": " ", "is_class": " "}};
  static METHODS = {"CONSTRUCTOR": {"visibility": "U", "parameters": {"PATTERN": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "IGNORE_CASE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}},
  "CREATE_MATCHER": {"visibility": "U", "parameters": {"RO_MATCHER": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_MATCHER", RTTIName: "\\CLASS=CL_ABAP_MATCHER"});}, "is_optional": " "}, "TEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}}},
  "CREATE_PCRE": {"visibility": "U", "parameters": {"REGEX": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"});}, "is_optional": " "}, "PATTERN": {"type": () => {return new abap.types.Character();}, "is_optional": " "}, "IGNORE_CASE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "create_matcher": this.create_matcher.bind(this),
    };
    this.pattern = new abap.types.String({qualifiedName: "STRING"});
    this.mv_pattern = new abap.types.String({qualifiedName: "STRING"});
    this.mv_ignore_case = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
  }
  async constructor_(INPUT) {
    let pattern = INPUT?.pattern;
    let ignore_case = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.ignore_case) {ignore_case.set(INPUT.ignore_case);}
    if (INPUT === undefined || INPUT.ignore_case === undefined) {ignore_case = abap.builtin.abap_false;}
    this.mv_pattern.set(pattern);
    this.me.get().pattern.set(pattern);
    this.mv_ignore_case.set(ignore_case);
    return this;
  }
  async create_pcre(INPUT) {
    return cl_abap_regex.create_pcre(INPUT);
  }
  static async create_pcre(INPUT) {
    let regex = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"});
    let pattern = INPUT?.pattern;
    let ignore_case = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.ignore_case) {ignore_case.set(INPUT.ignore_case);}
    if (INPUT === undefined || INPUT.ignore_case === undefined) {ignore_case = abap.builtin.abap_false;}
    regex.set(await (new abap.Classes['CL_ABAP_REGEX']()).constructor_({pattern: pattern, ignore_case: ignore_case}));
    return regex;
  }
  async create_matcher(INPUT) {
    let ro_matcher = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_MATCHER", RTTIName: "\\CLASS=CL_ABAP_MATCHER"});
    let text = INPUT?.text;
    ro_matcher.set(await (new abap.Classes['CL_ABAP_MATCHER']()).constructor_({pattern: this.mv_pattern, ignore_case: this.mv_ignore_case, text: text}));
    return ro_matcher;
  }
}
abap.Classes['CL_ABAP_REGEX'] = cl_abap_regex;
export {cl_abap_regex};