org.jboss.aop.util.reference
Class PersistentReference
java.lang.Object
org.jboss.aop.util.reference.PersistentReference
- Direct Known Subclasses:
- ArgumentPersistentReference
public abstract class PersistentReference
- extends Object
Copied from org.jboss.serial.references;
Base class for persistent references.
Persistent reference is a Weak/Soft reference to a reflection object.
If the reflection object is garbage collected, the reference is then rebuilt using reflection operations.
- Author:
- csuconic
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REFERENCE_WEAK
public static final int REFERENCE_WEAK
- See Also:
- Constant Field Values
REFERENCE_SOFT
public static final int REFERENCE_SOFT
- See Also:
- Constant Field Values
PersistentReference
public PersistentReference(Class<?> clazz,
Object referencedObject,
int referenceType)
- Parameters:
clazz
- The clazz being used on this object (where we will do reflection operations)referencedObject
- The reflection object being usedreferenceType
- if REFERENCE_WEAK will use a WeakReference, and if REFERENCE_SOFT will use a SoftReference for referencedObject
internalGet
protected Object internalGet()
- Checks the reference but doesn't perform rebuild if empty
get
public Object get()
rebuildReference
public abstract Object rebuildReference()
throws Exception
- Throws:
Exception
buildReference
public void buildReference(Object obj)
getMappedClass
public Class<?> getMappedClass()
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.