Package org.instancio.internal.selectors
Class MetamodelSelector
- java.lang.Object
-
- org.instancio.internal.selectors.SelectorImpl
-
- org.instancio.internal.selectors.MetamodelSelector
-
- All Implemented Interfaces:
GroupableSelector
,Flattener
,Selector
,TargetSelector
,ToScopeConvertible
public final class MetamodelSelector extends SelectorImpl
Selector for use in generated metamodel classes only.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Selector
copyWithNewStackTraceHolder()
Since selector in a metamodel class is a static final field, thestackTraceHolder
property it contains does not indicate where the metamodel property is used in client code.static Selector
of(Class<?> targetClass, String fieldName)
-
Methods inherited from class org.instancio.internal.selectors.SelectorImpl
equals, flatten, getFieldName, getParent, getScopes, getSelectorTargetKind, getStackTraceHolder, getStackTraceLine, getTargetClass, hashCode, toScope, toString, within
-
-
-
-
Method Detail
-
copyWithNewStackTraceHolder
public Selector copyWithNewStackTraceHolder()
Since selector in a metamodel class is a static final field, thestackTraceHolder
property it contains does not indicate where the metamodel property is used in client code. This method creates a copy of the selector with a newstackTraceHolder
, so that correct location can be output in the "unused selectors" error message.- Returns:
- a copy of this selector containing a new
stackTraceHolder
-
-