Class Transformer.ForField

    • Constructor Detail

      • ForField

        public ForField​(Transformer<FieldDescription.Token> transformer)
        Creates a new simple field transformer.
        Parameters:
        transformer - The token transformer to apply to a transformed field.
    • Method Detail

      • withModifiers

        public static Transformer<FieldDescription> withModifiers​(ModifierContributor.ForField... modifierContributor)
        Creates a field transformer that patches the transformed field by the given modifier contributors.
        Parameters:
        modifierContributor - The modifier contributors to apply.
        Returns:
        A suitable field transformer.
      • withModifiers

        public static Transformer<FieldDescription> withModifiers​(java.util.List<? extends ModifierContributor.ForField> modifierContributors)
        Creates a field transformer that patches the transformed field by the given modifier contributors.
        Parameters:
        modifierContributors - The modifier contributors to apply.
        Returns:
        A suitable field transformer.