|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ubercraft.sucre.reflect.Reflect
public class Reflect
Main entry point to get and/or register reflector factories and reflectors by type.
| Field Summary | |
|---|---|
static Reflect |
FIELDS
A shared instance for field-based access. |
static Reflect |
METHODS
A shared instance for method-based access. |
| Constructor Summary | |
|---|---|
Reflect()
Create a new instance, defaulting to the built-in method reflection factory. |
|
Reflect(Class<? extends ReflectorFactory> defaultFactoryClass)
Create a new instance with the given default reflector factory type. |
|
| Method Summary | |
|---|---|
void |
clearCache()
Completely clears the reflector cache. |
Reflector |
getReflector(Class<?> type)
Gets the reflector for a type. |
void |
preCache(Class<?> type)
Causes the reflector for the given type to be pre-cached. |
void |
setReflectorFactoryClass(Class<?> type,
Class<? extends ReflectorFactory> clazz)
Set reflector factory class for a type (pass null factory class to unset). |
void |
unCache(Class<?> type)
Removes any cached reflector for the given type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Reflect METHODS
public static final Reflect FIELDS
| Constructor Detail |
|---|
public Reflect()
public Reflect(Class<? extends ReflectorFactory> defaultFactoryClass)
| Method Detail |
|---|
public void setReflectorFactoryClass(Class<?> type,
Class<? extends ReflectorFactory> clazz)
public void preCache(Class<?> type)
public void unCache(Class<?> type)
public void clearCache()
public Reflector getReflector(Class<?> type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||