Package one.microstream.reflect
Interface ReflectiveCopier<S>
- Type Parameters:
S
- Does not necessarily have to be a class.
- All Known Implementing Classes:
ReflectiveCopier.Default
public interface ReflectiveCopier<S>
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ReflectiveCopier.Default<S>
-
Method Summary
Modifier and Type Method Description <T extends S>
Tcopy(S sourceInstance, T targetInstance)
CopyPredicate
copySelector()
default <T extends S>
TcopyTo(T targetInstance)
Predicate<? super Field>
fieldSelector()
<I extends Consumer<? super Field>>
IiterateFields(I iterator)
static <S, C extends S>
ReflectiveCopier<S>New(Class<C> sourceClass)
static <S, C extends S>
ReflectiveCopier<S>New(Class<C> sourceClass, S sourceInstance)
static <S, C extends S>
ReflectiveCopier<S>New(Class<C> sourceClass, S sourceInstance, Predicate<? super Field> fieldSelector)
static <S, C extends S>
ReflectiveCopier<S>New(Class<C> sourceClass, S sourceInstance, Predicate<? super Field> fieldSelector, CopyPredicate copySelector)
static <S> ReflectiveCopier<S>
New(S sourceInstance)
Class<?>
sourceClass()
Does not necessarily have to be S.S
sourceInstance()
-
Method Details
-
copyTo
-
copy
-
sourceClass
Class<?> sourceClass()Does not necessarily have to be S. S could be an interface.- Returns:
- the source class
-
sourceInstance
S sourceInstance() -
fieldSelector
-
copySelector
CopyPredicate copySelector() -
iterateFields
-
New
-
New
-
New
-
New
static <S, C extends S> ReflectiveCopier<S> New(Class<C> sourceClass, S sourceInstance, Predicate<? super Field> fieldSelector) -
New
static <S, C extends S> ReflectiveCopier<S> New(Class<C> sourceClass, S sourceInstance, Predicate<? super Field> fieldSelector, CopyPredicate copySelector)
-