org.aspectj.weaver
Class World.TypeMap

java.lang.Object
  extended by org.aspectj.weaver.World.TypeMap
Enclosing class:
World

public static class World.TypeMap
extends java.lang.Object


Field Summary
 java.util.List<java.lang.String> addedSinceLastDemote
           
static int DONT_USE_REFS
           
 int policy
           
static int USE_SOFT_REFS
           
static int USE_WEAK_REFS
           
static boolean useExpendableMap
           
 java.util.List<java.lang.String> writtenClasses
           
 
Method Summary
 void checkq()
           
 void classWriteEvent(java.lang.String classname)
           
 int demote()
           
 int demote(boolean atEndOfCompile)
          Go through any types added during the previous file weave.
 ResolvedType get(java.lang.String key)
          Lookup a type by its signature, always look in the real map before the expendable map
 java.util.Map<java.lang.String,java.lang.ref.Reference<ResolvedType>> getExpendableMap()
           
 java.util.Map<java.lang.String,ResolvedType> getMainMap()
           
 ResolvedType put(java.lang.String key, ResolvedType type)
          Add a new type into the map, the key is the type signature.
 ResolvedType remove(java.lang.String key)
          Remove a type from the map
 void report()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DONT_USE_REFS

public static final int DONT_USE_REFS
See Also:
Constant Field Values

USE_WEAK_REFS

public static final int USE_WEAK_REFS
See Also:
Constant Field Values

USE_SOFT_REFS

public static final int USE_SOFT_REFS
See Also:
Constant Field Values

addedSinceLastDemote

public java.util.List<java.lang.String> addedSinceLastDemote

writtenClasses

public java.util.List<java.lang.String> writtenClasses

useExpendableMap

public static boolean useExpendableMap

policy

public int policy
Method Detail

getExpendableMap

public java.util.Map<java.lang.String,java.lang.ref.Reference<ResolvedType>> getExpendableMap()

getMainMap

public java.util.Map<java.lang.String,ResolvedType> getMainMap()

demote

public int demote()

demote

public int demote(boolean atEndOfCompile)
Go through any types added during the previous file weave. If any are suitable for demotion, then put them in the expendable map where GC can claim them at some point later. Demotion means: the type is not an aspect, the type is not java.lang.Object, the type is not primitive and the type is not affected by type mungers in any way. Further refinements of these conditions may allow for more demotions.

Returns:
number of types demoted

put

public ResolvedType put(java.lang.String key,
                        ResolvedType type)
Add a new type into the map, the key is the type signature. Some types do *not* go in the map, these are ones involving *member* type variables. The reason is that when all you have is the signature which gives you a type variable name, you cannot guarantee you are using the type variable in the same way as someone previously working with a similarly named type variable. So, these do not go into the map: - TypeVariableReferenceType. - ParameterizedType where a member type variable is involved. - BoundedReferenceType when one of the bounds is a type variable. definition: "member type variables" - a tvar declared on a generic method/ctor as opposed to those you see declared on a generic type.


report

public void report()

checkq

public void checkq()

get

public ResolvedType get(java.lang.String key)
Lookup a type by its signature, always look in the real map before the expendable map


remove

public ResolvedType remove(java.lang.String key)
Remove a type from the map


classWriteEvent

public void classWriteEvent(java.lang.String classname)