public ClasspathItemWrapper read(final BufferedReader r) { final String s = RW.lookString(r); if (s.startsWith("Library:")) { return new WeakClasspathItemWrapper(RW.readStringAttribute(r, "Library:"), "Library"); } if (s.startsWith("Module:")) { return new WeakClasspathItemWrapper(RW.readStringAttribute(r, "Module:"), "Module"); } else { return new GenericClasspathItemWrapper(r); } }
public ModuleWrapper(final BufferedReader r) { myModule = null; myName = RW.readStringAttribute(r, "Module:"); RW.readTag(r, "SourceProperties:"); mySource = new Properties(r); RW.readTag(r, "TestProperties:"); myTest = new Properties(r); RW.readTag(r, "Excludes:"); myExcludes = (Set<String>) RW.readMany(r, RW.myStringReader, new HashSet<String>()); RW.readTag(r, "Libraries:"); myLibraries = (Set<LibraryWrapper>) RW.readMany(r, myLibraryWrapperReader, new HashSet<LibraryWrapper>()); RW.readTag(r, "Dependencies:"); myDependsOn = (List<ClasspathItemWrapper>) RW.readMany( r, myWeakClasspathItemWrapperReader, new ArrayList<ClasspathItemWrapper>()); myTestDependsOn = (List<ClasspathItemWrapper>) RW.readMany( r, myWeakClasspathItemWrapperReader, new ArrayList<ClasspathItemWrapper>()); }
public Properties(final BufferedReader r) { RW.readTag(r, "Roots:"); myRoots = (Set<String>) RW.readMany(r, RW.myStringReader, new HashSet<String>()); RW.readTag(r, "Sources:"); mySources = new HashMap<FileWrapper, FileWrapper>(); for (FileWrapper fw : (Set<FileWrapper>) RW.readMany(r, myFileWrapperReader, new HashSet<FileWrapper>())) { mySources.put(fw, fw); } RW.readTag(r, "Output:"); final String s = RW.readString(r); myOutput = s.equals("") ? null : s; myOutputStatus = RW.readStringAttribute(r, "OutputStatus:"); }
private ProjectWrapper(final BufferedReader r, final Set<String> affected) { affectedFiles = affected; myProject = null; myProjectBuilder = null; myHistory = null; myRoot = RW.readStringAttribute(r, "Root:"); myProjectSnapshot = myHomeDir + File.separator + myJPSDir + File.separator + myRoot.replace(File.separatorChar, myFileSeparatorReplacement); RW.readTag(r, "Libraries:"); final Set<LibraryWrapper> libs = (Set<LibraryWrapper>) RW.readMany(r, myLibraryWrapperReader, new HashSet<LibraryWrapper>()); for (LibraryWrapper l : libs) { myLibraries.put(l.getName(), l); } RW.readTag(r, "Modules:"); final Set<ModuleWrapper> mods = (Set<ModuleWrapper>) RW.readMany(r, myModuleWrapperReader, new HashSet<ModuleWrapper>()); for (ModuleWrapper m : mods) { myModules.put(m.getName(), m); } RW.readMany(r, RW.myStringReader, affectedFiles); try { dependencyMapping = new Mappings(getMapDir()); } catch (IOException e) { throw new RuntimeException(e); } backendCallback = dependencyMapping.getCallback(); }
public LibraryWrapper(final BufferedReader r) { myName = RW.readStringAttribute(r, "Library:"); RW.readTag(r, "Classpath:"); myClassPath = (List<String>) RW.readMany(r, RW.myStringReader, new ArrayList<String>()); }