Class FieldLocator.AbstractBase

    • Field Detail

      • accessingType

        protected final TypeDescription accessingType
        The type accessing the field.
    • Constructor Detail

      • AbstractBase

        protected AbstractBase​(TypeDescription accessingType)
        Creates a new field locator.
        Parameters:
        accessingType - The type accessing the field.
    • Method Detail

      • locate

        public FieldLocator.Resolution locate​(java.lang.String name)
        Locates a field with the given name and throws an exception if no such type exists.
        Specified by:
        locate in interface FieldLocator
        Parameters:
        name - The name of the field to locate.
        Returns:
        A resolution for a field lookup.
      • locate

        public FieldLocator.Resolution locate​(java.lang.String name,
                                              TypeDescription type)
        Locates a field with the given name and type and throws an exception if no such type exists.
        Specified by:
        locate in interface FieldLocator
        Parameters:
        name - The name of the field to locate.
        type - The type fo the field to locate.
        Returns:
        A resolution for a field lookup.
      • locate

        protected abstract FieldList<?> locate​(ElementMatcher<? super FieldDescription> matcher)
        Locates fields that match the given matcher.
        Parameters:
        matcher - The matcher that identifies fields of interest.
        Returns:
        A list of fields that match the specified matcher.