public class JavaModelCache
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
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 |
static java.lang.String |
JAR_TYPE_RATIO_PROPERTY |
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 and Description |
|---|
JavaModelCache() |
| Modifier and Type | Method and Description |
|---|---|
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 |
removeFromJarTypeCache(BinaryType type) |
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) |
public static boolean VERBOSE
public static final int DEFAULT_PROJECT_SIZE
public static final int DEFAULT_ROOT_SIZE
public static final int DEFAULT_PKG_SIZE
public static final int DEFAULT_OPENABLE_SIZE
public static final int DEFAULT_CHILDREN_SIZE
public static final java.lang.String RATIO_PROPERTY
public static final java.lang.String JAR_TYPE_RATIO_PROPERTY
public static final java.lang.Object NON_EXISTING_JAR_TYPE_INFO
protected double memoryRatio
protected java.lang.Object modelInfo
protected java.util.HashMap projectCache
protected ElementCache rootCache
protected ElementCache pkgCache
protected ElementCache openableCache
protected java.util.Map childrenCache
protected LRUCache jarTypeCache
public java.lang.Object getInfo(IJavaElement element)
public IJavaElement getExistingElement(IJavaElement element)
protected double getMemoryRatio()
protected java.lang.Object peekAtInfo(IJavaElement element)
protected void putInfo(IJavaElement element, java.lang.Object info)
protected void removeInfo(JavaElement element)
protected void resetJarTypeCache()
protected void removeFromJarTypeCache(BinaryType type)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringFillingRation(java.lang.String prefix)