public static final List<String> readLines(String s) throws IOException { return readLines(new FileReader(s)); } public static final List<String> readLines(URL u) throws IOException {
public static final String[] readLinesArray(String s) throws IOException { List<String> v=readLines(s); String ret[]=new String[v.size()]; int i=0; for (String line : v) { ret[i++]=line; } return ret; } }
public static final List<String> readLines(String s) throws IOException { return readLines(new FileReader(s)); } public static final List<String> readLines(URL u) throws IOException {
public static final String[] readLinesArray(String s) throws IOException { List<String> v=readLines(s); String ret[]=new String[v.size()]; int i=0; for (String line : v) { ret[i++]=line; } return ret; } }
public static final List<String> readLines(InputStream in) throws IOException { if (in == null) return null; List<String> r = readLines(new InputStreamReader(in)); in.close(); return r; } public static final List<String> readLines(Reader r) throws IOException {
public static final List<String> readLines(URL u) throws IOException { InputStream in = u.openStream(); List<String> r = readLines(in); in.close(); return r; } public static final List<String> readLines(InputStream in) throws IOException {
public static final List<String> readLines(URL u) throws IOException { InputStream in = u.openStream(); List<String> r = readLines(in); in.close(); return r; } public static final List<String> readLines(InputStream in) throws IOException {
public static final List<String> readLines(InputStream in) throws IOException { if (in == null) return null; List<String> r = readLines(new InputStreamReader(in)); in.close(); return r; } public static final List<String> readLines(Reader r) throws IOException {
public static Set<String> getForcedProtocolParents(String protocolName) { if (protocolsForcedInheritance == null) { protocolsForcedInheritance = new LinkedHashMap<String, Set<String>>(); try { InputStream in = ObjectiveCGenerator.class.getClassLoader().getResourceAsStream("com/ochafik/lang/jnaerator/ObjectiveCProtocolsForcedInheritanceList.data"); List<String> lines = ReadText.readLines(in); for (String line : lines) { line = line.trim(); if (line.startsWith("//") || line.startsWith("#") || line.length() == 0) { continue; } String[] tks = line.split(":"); protocolsForcedInheritance.put(tks[0], new TreeSet<String>(Arrays.asList(tks[1].split(",")))); } } catch (IOException ex) { ex.printStackTrace(); } } Set<String> ret = protocolsForcedInheritance.get(protocolName); return ret == null ? Collections.EMPTY_SET : ret; } static Map<String, Set<String>> methodsExcludedFromStaticForwarding;
public static Set<String> getForcedProtocolParents(String protocolName) { if (protocolsForcedInheritance == null) { protocolsForcedInheritance = new LinkedHashMap<String, Set<String>>(); try { InputStream in = ObjectiveCGenerator.class.getClassLoader().getResourceAsStream("com/ochafik/lang/jnaerator/ObjectiveCProtocolsForcedInheritanceList.data"); List<String> lines = ReadText.readLines(in); for (String line : lines) { line = line.trim(); if (line.startsWith("//") || line.startsWith("#") || line.length() == 0) { continue; } String[] tks = line.split(":"); protocolsForcedInheritance.put(tks[0], new TreeSet<String>(Arrays.asList(tks[1].split(",")))); } } catch (IOException ex) { ex.printStackTrace(); } } Set<String> ret = protocolsForcedInheritance.get(protocolName); return ret == null ? Collections.EMPTY_SET : ret; } static Map<String, Set<String>> methodsExcludedFromStaticForwarding;
files.addAll(ReadText.readLines(classLoader.getResourceAsStream(s.trim())));
files.addAll(ReadText.readLines(classLoader.getResourceAsStream(s.trim())));
InputStream in = ObjectiveCGenerator.class.getClassLoader().getResourceAsStream("com/ochafik/lang/jnaerator/ObjectiveCStaticForwardsExcludeList.data"); List<String> lines = ReadText.readLines(in); for (String line : lines) { line = line.trim();
InputStream in = ObjectiveCGenerator.class.getClassLoader().getResourceAsStream("com/ochafik/lang/jnaerator/ObjectiveCStaticForwardsExcludeList.data"); List<String> lines = ReadText.readLines(in); for (String line : lines) { line = line.trim();
@Parameters public static List<Object[]> readDataFromFile() throws IOException { List<String> lines = ReadText.readLines(ObjCppParsingTest.class.getClassLoader().getResource(TEST_FILE)); TestOption testOption = TestOption.ParseAndPrettyPrint; List<Object[]> data = new ArrayList<Object[]>();