注释类型 NewViewProperty


  • @Target({FIELD,METHOD})
    @Retention(SOURCE)
    public @interface NewViewProperty
    Used to add the new property to the generate class. It should be put on the method. If Dynamic is also found on this method, it means this method is the dynamic property method. If there is no Dynamic found on this method, it means this method is the static property method.
    The static property method should look like this:
     public static PropertyType methodName(SourceType source)
     
    The dynamic property method should look like this:
     public static PropertyType methodName(@InjectProperty TypeOfPropertyA a, @InjectProperty TypeOfPropertyB b, ...)
     
    The static property is initialized in the constructor or read method, and has a related field in the generated class. However the dynamic property is calculated in the getter method, and has not a related field in the generated class.
    • 必需元素概要

      所需元素 
      修饰符和类型 必需的元素 说明
      String value
      The property name.
    • 可选元素概要

      可选元素 
      修饰符和类型 可选元素 说明
      Access getter
      The access type of the getter methods.
      Access setter
      The access type of the setter methods.
    • 元素详细资料

      • value

        String value
        The property name.
        返回:
        the property name.
      • getter

        Access getter
        The access type of the getter methods. By default, inherited from the ViewOf annotation.
        返回:
        the access type of the getter methods
        默认值:
        io.github.vipcxj.beanknife.runtime.annotations.Access.UNKNOWN
      • setter

        Access setter
        The access type of the setter methods. By default, inherited from the ViewOf annotation.
        返回:
        the access type of the setter methods
        默认值:
        io.github.vipcxj.beanknife.runtime.annotations.Access.UNKNOWN