1 32 package net.sf.retrotranslator.runtime.java.util.regex; 33 34 import java.util.regex.Matcher ; 35 36 39 public class _MatchResult { 40 41 public static boolean executeInstanceOfInstruction(Object object) { 42 return object instanceof Matcher || 43 object instanceof MatchResult_; 44 } 45 46 public static Object executeCheckCastInstruction(Object object) { 47 if (object instanceof Matcher ) { 48 return (Matcher ) object; 49 } 50 return (MatchResult_) object; 51 } 52 53 public static int start(Object object) { 54 if (object instanceof Matcher ) { 55 return ((Matcher ) object).start(); 56 } 57 return ((MatchResult_) object).start(); 58 } 59 60 public static int start(Object object, int group) { 61 if (object instanceof Matcher ) { 62 return ((Matcher ) object).start(group); 63 } 64 return ((MatchResult_) object).start(group); 65 } 66 67 public static int end(Object object) { 68 if (object instanceof Matcher ) { 69 return ((Matcher ) object).end(); 70 } 71 return ((MatchResult_) object).end(); 72 } 73 74 public static int end(Object object, int group) { 75 if (object instanceof Matcher ) { 76 return ((Matcher ) object).end(group); 77 } 78 return ((MatchResult_) object).end(group); 79 } 80 81 public static String group(Object object) { 82 if (object instanceof Matcher ) { 83 return ((Matcher ) object).group(); 84 } 85 return ((MatchResult_) object).group(); 86 } 87 88 public static String group(Object object, int group) { 89 if (object instanceof Matcher ) { 90 return ((Matcher ) object).group(group); 91 } 92 return ((MatchResult_) object).group(group); 93 } 94 95 public static int groupCount(Object object) { 96 if (object instanceof Matcher ) { 97 return ((Matcher ) object).groupCount(); 98 } 99 return ((MatchResult_) object).groupCount(); 100 } 101 102 } 103 | Popular Tags |