Lines 9-19
Link Here
|
9 |
* |
9 |
* |
10 |
* Contributors: |
10 |
* Contributors: |
11 |
* PARC initial implementation |
11 |
* PARC initial implementation |
12 |
* Adrian Colyer, Andy Clement, overhaul for generics, Abraham Nevado |
12 |
* Adrian Colyer, Andy Clement, overhaul for generics |
|
|
13 |
* Abraham Nevado Serialization |
13 |
* ******************************************************************/ |
14 |
* ******************************************************************/ |
14 |
|
15 |
|
15 |
package org.aspectj.weaver; |
16 |
package org.aspectj.weaver; |
16 |
|
17 |
|
|
|
18 |
import java.io.Serializable; |
17 |
import java.lang.ref.Reference; |
19 |
import java.lang.ref.Reference; |
18 |
import java.lang.ref.ReferenceQueue; |
20 |
import java.lang.ref.ReferenceQueue; |
19 |
import java.lang.ref.SoftReference; |
21 |
import java.lang.ref.SoftReference; |
Lines 53-59
Link Here
|
53 |
/** |
55 |
/** |
54 |
* A World is a collection of known types and crosscutting members. |
56 |
* A World is a collection of known types and crosscutting members. |
55 |
*/ |
57 |
*/ |
56 |
public abstract class World implements Dump.INode { |
58 |
public abstract class World implements Dump.INode, Serializable { |
57 |
/** handler for any messages produced during resolution etc. */ |
59 |
/** handler for any messages produced during resolution etc. */ |
58 |
private IMessageHandler messageHandler = IMessageHandler.SYSTEM_ERR; |
60 |
private IMessageHandler messageHandler = IMessageHandler.SYSTEM_ERR; |
59 |
|
61 |
|
Lines 141-147
Link Here
|
141 |
// Minimal Model controls whether model entities that are not involved in relationships are deleted post-build |
143 |
// Minimal Model controls whether model entities that are not involved in relationships are deleted post-build |
142 |
private boolean minimalModel = false; |
144 |
private boolean minimalModel = false; |
143 |
private boolean targettingRuntime1_6_10 = false; |
145 |
private boolean targettingRuntime1_6_10 = false; |
144 |
|
146 |
|
145 |
private boolean completeBinaryTypes = false; |
147 |
private boolean completeBinaryTypes = false; |
146 |
private boolean overWeaving = false; |
148 |
private boolean overWeaving = false; |
147 |
public boolean forDEBUG_structuralChangesCode = false; |
149 |
public boolean forDEBUG_structuralChangesCode = false; |
Lines 152-158
Link Here
|
152 |
|
154 |
|
153 |
public int infoMessagesEnabled = 0; // 0=uninitialized, 1=no, 2=yes |
155 |
public int infoMessagesEnabled = 0; // 0=uninitialized, 1=no, 2=yes |
154 |
|
156 |
|
155 |
private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.class); |
157 |
private transient static Trace trace = TraceFactory.getTraceFactory().getTrace(World.class); |
156 |
|
158 |
|
157 |
private long errorThreshold; |
159 |
private long errorThreshold; |
158 |
private long warningThreshold; |
160 |
private long warningThreshold; |
Lines 815-821
Link Here
|
815 |
ensureAdvancedConfigurationProcessed(); |
817 |
ensureAdvancedConfigurationProcessed(); |
816 |
return targettingRuntime1_6_10; |
818 |
return targettingRuntime1_6_10; |
817 |
} |
819 |
} |
818 |
|
820 |
|
819 |
public void setBehaveInJava5Way(boolean b) { |
821 |
public void setBehaveInJava5Way(boolean b) { |
820 |
behaveInJava5Way = b; |
822 |
behaveInJava5Way = b; |
821 |
} |
823 |
} |
Lines 987-993
Link Here
|
987 |
* Map of types in the world, can have 'references' to expendable ones which can be garbage collected to recover memory. An |
989 |
* Map of types in the world, can have 'references' to expendable ones which can be garbage collected to recover memory. An |
988 |
* expendable type is a reference type that is not exposed to the weaver (ie just pulled in for type resolution purposes). |
990 |
* expendable type is a reference type that is not exposed to the weaver (ie just pulled in for type resolution purposes). |
989 |
*/ |
991 |
*/ |
990 |
public static class TypeMap { |
992 |
public static class TypeMap implements Serializable { |
991 |
|
993 |
|
992 |
// Strategy for entries in the expendable map |
994 |
// Strategy for entries in the expendable map |
993 |
public final static int DONT_USE_REFS = 0; // Hang around forever |
995 |
public final static int DONT_USE_REFS = 0; // Hang around forever |
Lines 1008-1014
Link Here
|
1008 |
final Map<String, ResolvedType> tMap = new HashMap<String, ResolvedType>(); |
1010 |
final Map<String, ResolvedType> tMap = new HashMap<String, ResolvedType>(); |
1009 |
|
1011 |
|
1010 |
// Map of types that may be ejected from the cache if we need space |
1012 |
// Map of types that may be ejected from the cache if we need space |
1011 |
final Map<String, Reference<ResolvedType>> expendableMap = Collections |
1013 |
final transient Map<String, Reference<ResolvedType>> expendableMap = Collections |
1012 |
.synchronizedMap(new WeakHashMap<String, Reference<ResolvedType>>()); |
1014 |
.synchronizedMap(new WeakHashMap<String, Reference<ResolvedType>>()); |
1013 |
|
1015 |
|
1014 |
private final World w; |
1016 |
private final World w; |
Lines 1347-1353
Link Here
|
1347 |
/** |
1349 |
/** |
1348 |
* This class is used to compute and store precedence relationships between aspects. |
1350 |
* This class is used to compute and store precedence relationships between aspects. |
1349 |
*/ |
1351 |
*/ |
1350 |
private static class AspectPrecedenceCalculator { |
1352 |
private static class AspectPrecedenceCalculator implements Serializable{ |
1351 |
|
1353 |
|
1352 |
private final World world; |
1354 |
private final World world; |
1353 |
private final Map<PrecedenceCacheKey, Integer> cachedResults; |
1355 |
private final Map<PrecedenceCacheKey, Integer> cachedResults; |
Lines 1516-1522
Link Here
|
1516 |
if (s.equalsIgnoreCase("true")) { |
1518 |
if (s.equalsIgnoreCase("true")) { |
1517 |
targettingRuntime1_6_10 = true; |
1519 |
targettingRuntime1_6_10 = true; |
1518 |
} |
1520 |
} |
1519 |
|
1521 |
|
1520 |
s = p.getProperty(xsetFAST_PACK_METHODS, "true"); |
1522 |
s = p.getProperty(xsetFAST_PACK_METHODS, "true"); |
1521 |
fastMethodPacking = s.equalsIgnoreCase("true"); |
1523 |
fastMethodPacking = s.equalsIgnoreCase("true"); |
1522 |
|
1524 |
|