Package org.apache.johnzon.mapper.access
Class BaseAccessMode
- java.lang.Object
-
- org.apache.johnzon.mapper.access.BaseAccessMode
-
- All Implemented Interfaces:
AccessMode
- Direct Known Subclasses:
FieldAccessMode
,FieldAndMethodAccessMode
,MethodAccessMode
public abstract class BaseAccessMode extends Object implements AccessMode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseAccessMode.AllEntriesFieldFilteringStrategy
static class
BaseAccessMode.ConfiguredFieldFilteringStrategy
static interface
BaseAccessMode.FieldFilteringStrategy
static class
BaseAccessMode.SingleEntryFieldFilteringStrategy
-
Nested classes/interfaces inherited from interface org.apache.johnzon.mapper.access.AccessMode
AccessMode.DecoratedType, AccessMode.Factory, AccessMode.Reader, AccessMode.Writer
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
acceptHiddenConstructor
private BaseAccessMode.FieldFilteringStrategy
fieldFilteringStrategy
private static Type[]
NO_PARAMS
private boolean
useConstructor
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseAccessMode(boolean useConstructor, boolean acceptHiddenConstructor)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.johnzon.mapper.access.AccessMode
findFactory, findMapAdder
-
-
-
-
Field Detail
-
NO_PARAMS
private static final Type[] NO_PARAMS
-
fieldFilteringStrategy
private BaseAccessMode.FieldFilteringStrategy fieldFilteringStrategy
-
acceptHiddenConstructor
private final boolean acceptHiddenConstructor
-
useConstructor
private final boolean useConstructor
-
-
Method Detail
-
doFindReaders
protected abstract Map<String,AccessMode.Reader> doFindReaders(Class<?> clazz)
-
doFindWriters
protected abstract Map<String,AccessMode.Writer> doFindWriters(Class<?> clazz)
-
fieldComparator
public Comparator<String> fieldComparator(Class<?> clazz)
- Specified by:
fieldComparator
in interfaceAccessMode
-
findReaders
public Map<String,AccessMode.Reader> findReaders(Class<?> clazz)
- Specified by:
findReaders
in interfaceAccessMode
-
findWriters
public Map<String,AccessMode.Writer> findWriters(Class<?> clazz)
- Specified by:
findWriters
in interfaceAccessMode
-
setFieldFilteringStrategy
public void setFieldFilteringStrategy(BaseAccessMode.FieldFilteringStrategy fieldFilteringStrategy)
-
getFieldFilteringStrategy
public BaseAccessMode.FieldFilteringStrategy getFieldFilteringStrategy()
-
findReader
public ObjectConverter.Reader<?> findReader(Class<?> clazz)
- Specified by:
findReader
in interfaceAccessMode
-
findWriter
public ObjectConverter.Writer<?> findWriter(Class<?> clazz)
- Specified by:
findWriter
in interfaceAccessMode
-
findAdapter
public Adapter<?,?> findAdapter(Class<?> clazz)
- Specified by:
findAdapter
in interfaceAccessMode
-
afterParsed
public void afterParsed(Class<?> clazz)
Description copied from interface:AccessMode
Called once johnzon will not use AccessMode anymore. Can be used to clean up any local cache.- Specified by:
afterParsed
in interfaceAccessMode
- Parameters:
clazz
- the parsed class.
-
findFactory
public AccessMode.Factory findFactory(Class<?> clazz, Function<AnnotatedElement,String>... parameterNameExtractors)
- Specified by:
findFactory
in interfaceAccessMode
-
findRecordConstructor
private Constructor<?> findRecordConstructor(Class<?> clazz)
-
findAnyGetter
public Method findAnyGetter(Class<?> clazz)
- Specified by:
findAnyGetter
in interfaceAccessMode
-
findAnySetter
public Method findAnySetter(Class<?> clazz)
- Specified by:
findAnySetter
in interfaceAccessMode
-
findAnyField
public Field findAnyField(Class<?> clazz)
- Specified by:
findAnyField
in interfaceAccessMode
-
-