Class BeansAccess<T>
java.lang.Object
net.minidev.asm.BeansAccess<T>
- Type Parameters:
T- the type of the bean being accessed
Allow access reflect field using runtime generated accessor. BeansAccessor is
faster than java.lang.reflect.Method.invoke()
- Author:
- uriel Chemouni
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <P> BeansAccess<P> return the BeansAccess corresponding to a typestatic <P> BeansAccess<P> get(Class<P> type, FieldFilter filter) return the BeansAccess corresponding to a typeabstract Objectget field value by field indexget field value by field nameAccessor[]get internal accessorintReturns the index of the field accessor.getMap()get internal mapabstract Tcreate a new targeted objectabstract voidset field value by field indexvoidset field value by field nameprotected voidsetAccessor(Accessor[] accs) set Accessor
-
Constructor Details
-
BeansAccess
public BeansAccess()default constuctor
-
-
Method Details
-
setAccessor
-
getMap
-
getAccessors
-
get
return the BeansAccess corresponding to a type- Type Parameters:
P- working type- Parameters:
type- to be access- Returns:
- the BeansAccess
-
get
return the BeansAccess corresponding to a type- Type Parameters:
P- working type- Parameters:
type- to be accessfilter- FieldFilter- Returns:
- the BeansAccess
-
set
-
get
-
newInstance
-
set
-
get
-
getIndex
Returns the index of the field accessor.- Parameters:
name- field name- Returns:
- id of the field
-