org.aspectj.org.eclipse.jdt.internal.core
Class JavaModelCache

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.JavaModelCache

public class JavaModelCache
extends java.lang.Object

The cache of java elements to their respective info.


Field Summary
protected  java.util.Map childrenCache
          Cache of open children of openable Java Model Java elements
static int DEFAULT_CHILDREN_SIZE
           
static int DEFAULT_OPENABLE_SIZE
           
static int DEFAULT_PKG_SIZE
           
static int DEFAULT_PROJECT_SIZE
           
static int DEFAULT_ROOT_SIZE
           
protected  LRUCache jarTypeCache
           
protected  double memoryRatio
           
protected  java.lang.Object modelInfo
          Active Java Model Info
static java.lang.Object NON_EXISTING_JAR_TYPE_INFO
           
protected  ElementCache openableCache
          Cache of open compilation unit and class files
protected  ElementCache pkgCache
          Cache of open package fragments
protected  java.util.HashMap projectCache
          Cache of open projects.
static java.lang.String RATIO_PROPERTY
           
protected  ElementCache rootCache
          Cache of open package fragment roots.
static boolean VERBOSE
           
 
Constructor Summary
JavaModelCache()
           
 
Method Summary
 IJavaElement getExistingElement(IJavaElement element)
           
 java.lang.Object getInfo(IJavaElement element)
          Returns the info for the element.
protected  double getMemoryRatio()
           
protected  java.lang.Object peekAtInfo(IJavaElement element)
          Returns the info for this element without disturbing the cache ordering.
protected  void putInfo(IJavaElement element, java.lang.Object info)
          Remember the info for the element.
protected  void removeInfo(JavaElement element)
          Removes the info of the element from the cache.
protected  void resetJarTypeCache()
           
 java.lang.String toString()
           
 java.lang.String toStringFillingRation(java.lang.String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERBOSE

public static boolean VERBOSE

DEFAULT_PROJECT_SIZE

public static final int DEFAULT_PROJECT_SIZE
See Also:
Constant Field Values

DEFAULT_ROOT_SIZE

public static final int DEFAULT_ROOT_SIZE
See Also:
Constant Field Values

DEFAULT_PKG_SIZE

public static final int DEFAULT_PKG_SIZE
See Also:
Constant Field Values

DEFAULT_OPENABLE_SIZE

public static final int DEFAULT_OPENABLE_SIZE
See Also:
Constant Field Values

DEFAULT_CHILDREN_SIZE

public static final int DEFAULT_CHILDREN_SIZE
See Also:
Constant Field Values

RATIO_PROPERTY

public static final java.lang.String RATIO_PROPERTY
See Also:
Constant Field Values

NON_EXISTING_JAR_TYPE_INFO

public static final java.lang.Object NON_EXISTING_JAR_TYPE_INFO

memoryRatio

protected double memoryRatio

modelInfo

protected java.lang.Object modelInfo
Active Java Model Info


projectCache

protected java.util.HashMap projectCache
Cache of open projects.


rootCache

protected ElementCache rootCache
Cache of open package fragment roots.


pkgCache

protected ElementCache pkgCache
Cache of open package fragments


openableCache

protected ElementCache openableCache
Cache of open compilation unit and class files


childrenCache

protected java.util.Map childrenCache
Cache of open children of openable Java Model Java elements


jarTypeCache

protected LRUCache jarTypeCache
Constructor Detail

JavaModelCache

public JavaModelCache()
Method Detail

getInfo

public java.lang.Object getInfo(IJavaElement element)
Returns the info for the element.


getExistingElement

public IJavaElement getExistingElement(IJavaElement element)

getMemoryRatio

protected double getMemoryRatio()

peekAtInfo

protected java.lang.Object peekAtInfo(IJavaElement element)
Returns the info for this element without disturbing the cache ordering.


putInfo

protected void putInfo(IJavaElement element,
                       java.lang.Object info)
Remember the info for the element.


removeInfo

protected void removeInfo(JavaElement element)
Removes the info of the element from the cache.


resetJarTypeCache

protected void resetJarTypeCache()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringFillingRation

public java.lang.String toStringFillingRation(java.lang.String prefix)