Class FieldRegistry.Default.Compiled.Entry

    • Field Detail

      • fieldAttributeAppender

        private final FieldAttributeAppender fieldAttributeAppender
        The field attribute appender to apply on any matched field.
      • defaultValue

        private final java.lang.Object defaultValue
        The default value to write to the field or null if no default value is to be set for the field.
    • Constructor Detail

      • Entry

        protected Entry​(ElementMatcher<? super FieldDescription> matcher,
                        FieldAttributeAppender fieldAttributeAppender,
                        java.lang.Object defaultValue,
                        Transformer<FieldDescription> transformer)
        Creates a new entry.
        Parameters:
        matcher - The matcher to identify any field that this definition concerns.
        fieldAttributeAppender - The field attribute appender to apply on any matched field.
        defaultValue - The default value to write to the field or null if no default value is to be set for the field.
        transformer - The field transformer to apply to any matched field.
    • Method Detail

      • bind

        protected TypeWriter.FieldPool.Record bind​(TypeDescription instrumentedType,
                                                   FieldDescription fieldDescription)
        Binds this entry to the provided field description.
        Parameters:
        instrumentedType - The instrumented type for which this entry applies.
        fieldDescription - The field description to be bound to this entry.
        Returns:
        A record representing the binding of this entry to the provided field.
      • matches

        public boolean matches​(FieldDescription target)
        Matches a target against this element matcher.
        Specified by:
        matches in interface ElementMatcher<FieldDescription>
        Parameters:
        target - The instance to be matched.
        Returns:
        true if the given element is matched by this matcher or false otherwise.