Browse Source

generics refactoring

tags/V1_6_12M2
aclement 13 years ago
parent
commit
96c36dc383

+ 7
- 7
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/IncrementalStateManager.java View File

// SECRETAPI will consume more memory, so turn on at your own risk ;) Set to 'true' when memory usage is understood // SECRETAPI will consume more memory, so turn on at your own risk ;) Set to 'true' when memory usage is understood
public static boolean recordIncrementalStates = false; public static boolean recordIncrementalStates = false;
public static boolean debugIncrementalStates = false; public static boolean debugIncrementalStates = false;
private static Hashtable incrementalStates = new Hashtable();
private static Hashtable<String, AjState> incrementalStates = new Hashtable<String, AjState>();


public static void recordSuccessfulBuild(String buildConfig, AjState state) { public static void recordSuccessfulBuild(String buildConfig, AjState state) {
if (!recordIncrementalStates) { if (!recordIncrementalStates) {
*/ */
public static void persist() { public static void persist() {
// check serialization works // check serialization works
Set entries = incrementalStates.entrySet();
for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
Set<Map.Entry<String, AjState>> entries = incrementalStates.entrySet();
for (Iterator<Map.Entry<String, AjState>> iterator = entries.iterator(); iterator.hasNext();) {
Map.Entry<String, AjState> entry = iterator.next();
System.out.println("Name " + entry.getKey()); System.out.println("Name " + entry.getKey());
File f = new File("n:/temp/foo.ajstate"); File f = new File("n:/temp/foo.ajstate");
try { try {
// now, managing changes to entries on a classpath // now, managing changes to entries on a classpath


public static AjState findStateManagingOutputLocation(File location) { public static AjState findStateManagingOutputLocation(File location) {
Collection allStates = incrementalStates.values();
Collection<AjState> allStates = incrementalStates.values();
if (debugIncrementalStates) { if (debugIncrementalStates) {
System.err.println("> findStateManagingOutputLocation(" + location + ") has " + allStates.size() System.err.println("> findStateManagingOutputLocation(" + location + ") has " + allStates.size()
+ " states to look through"); + " states to look through");
} }
for (Iterator iter = allStates.iterator(); iter.hasNext();) {
AjState element = (AjState) iter.next();
for (Iterator<AjState> iter = allStates.iterator(); iter.hasNext();) {
AjState element = iter.next();
AjBuildConfig ajbc = element.getBuildConfig(); AjBuildConfig ajbc = element.getBuildConfig();
if (ajbc == null) { if (ajbc == null) {
// FIXME asc why can it ever be null? // FIXME asc why can it ever be null?

Loading…
Cancel
Save