接口 ValueCodeGenerator.Delegate

所有已知实现类:
ValueCodeGeneratorDelegates.ArrayDelegate, ValueCodeGeneratorDelegates.CharsetDelegate, ValueCodeGeneratorDelegates.ClassDelegate, ValueCodeGeneratorDelegates.CollectionDelegate, ValueCodeGeneratorDelegates.EnumDelegate, ValueCodeGeneratorDelegates.ListDelegate, ValueCodeGeneratorDelegates.MapDelegate, ValueCodeGeneratorDelegates.PrimitiveDelegate, ValueCodeGeneratorDelegates.ResolvableTypeDelegate, ValueCodeGeneratorDelegates.SetDelegate, ValueCodeGeneratorDelegates.StringDelegate
封闭类:
ValueCodeGenerator

public static interface ValueCodeGenerator.Delegate
Strategy interface that can be used to implement code generation for a particular value type.
  • 方法概要

    修饰符和类型
    方法
    说明
    cn.taketoday.javapoet.CodeBlock
    generateCode(ValueCodeGenerator valueCodeGenerator, Object value)
    Generate the code for the specified non-null value.
  • 方法详细资料

    • generateCode

      @Nullable cn.taketoday.javapoet.CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value)
      Generate the code for the specified non-null value. If this instance does not support the value, it should return null to indicate so.
      参数:
      valueCodeGenerator - the code generator to use for embedded values
      value - the value to generate
      返回:
      the code that represents the specified value or null if the specified value is not supported.