public abstract static class FieldLocator.AbstractBase extends Object implements FieldLocator
FieldLocator.AbstractBase, FieldLocator.Factory, FieldLocator.ForClassHierarchy, FieldLocator.ForExactType, FieldLocator.ForTopLevelType, FieldLocator.NoOp, FieldLocator.Resolution
Modifier and Type | Field and Description |
---|---|
protected TypeDescription |
accessingType
The type accessing the field.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractBase(TypeDescription accessingType)
Creates a new field locator.
|
Modifier and Type | Method and Description |
---|---|
protected abstract FieldList<?> |
locate(ElementMatcher<? super FieldDescription> matcher)
Locates fields that match the given matcher.
|
FieldLocator.Resolution |
locate(String name)
Locates a field with the given name and throws an exception if no such type exists.
|
FieldLocator.Resolution |
locate(String name,
TypeDescription type)
Locates a field with the given name and type and throws an exception if no such type exists.
|
protected final TypeDescription accessingType
protected AbstractBase(TypeDescription accessingType)
accessingType
- The type accessing the field.public FieldLocator.Resolution locate(String name)
FieldLocator
locate
in interface FieldLocator
name
- The name of the field to locate.public FieldLocator.Resolution locate(String name, TypeDescription type)
FieldLocator
locate
in interface FieldLocator
name
- The name of the field to locate.type
- The type fo the field to locate.protected abstract FieldList<?> locate(ElementMatcher<? super FieldDescription> matcher)
matcher
- The matcher that identifies fields of interest.Copyright © 2014–2018. All rights reserved.