lombok.Builder类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中lombok.Builder类的一些代码示例,展示了Builder类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Builder类的具体详情如下:
包路径:lombok.Builder
类名称:Builder

Builder介绍

暂无

代码示例

代码示例来源:origin: hs-web/hsweb-framework

/**
 * @author zhouhao
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SqlExecuteRequest implements Serializable{
  private static final long serialVersionUID = 8640714319329779262L;
  private List<SqlInfo> sql;

}

代码示例来源:origin: scouter-project/scouter

/**
 * Created by csk746(csk746@naver.com) on 2017. 10. 15..
 */
@Getter
@ToString
@AllArgsConstructor
@Builder
public class VisitorGroup {

  private String time;

  private long value;

  public static VisitorGroup of(MapPack mapPack){
    return VisitorGroup.builder().time(mapPack.getText("time")).value(mapPack.getLong("value")).build();
  }

}

代码示例来源:origin: aol/micro-server

@AllArgsConstructor
  @Builder
  @Getter
  public static class GenericEventData<T> extends BaseEventInfo {
    private final String name;
    private final String[] subTypes;
    private final T data;
  }
}

代码示例来源:origin: lets-blade/blade

/**
 * NettyServerGroup
 *
 * @author biezhi
 * @date 2017/9/22
 */
@Builder
@Getter
public class NettyServerGroup {

  private Class<? extends ServerSocketChannel> socketChannel;
  private MultithreadEventLoopGroup            boosGroup;
  private MultithreadEventLoopGroup            workerGroup;
}

代码示例来源:origin: codecentric/spring-boot-admin

@Data
@Builder
public static class Message {
  private final String summary;
  private final String themeColor;
  private final String title;
  @Builder.Default
  private final List<Section> sections = new ArrayList<>();
}

代码示例来源:origin: prontera/spring-cloud-rest-tcc

/**
 * @author Zhao Junjian
 */
@Getter
@Builder
@ToString(callSuper = true)
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class SwaggerApiInfo {

  private String title;

  private String version;

  private String serviceUrl;

  private List<ResponseMessage> statusList;

}

代码示例来源:origin: apache/incubator-gobblin

/**
 * A container for the differences between desired and existing files.
 */
@Builder
@ToString
protected static class DiffPathSet {
 /** Desired files that don't exist on target */
 @Singular(value = "copyFile")
 Collection<FileStatus> filesToCopy;
 /** Files in target that are not desired */
 @Singular(value = "deleteFile")
 Collection<Path> pathsToDelete;
}

代码示例来源:origin: lets-blade/blade

@Builder
class ParamStruct {

  Param          param;
  PathParam      pathParam;
  BodyParam      bodyParam;
  HeaderParam    headerParam;
  CookieParam    cookieParam;
  MultipartParam multipartParam;
  Type           argType;
  String         paramName;
  Request        request;
}

代码示例来源:origin: aol/micro-server

@Builder
@Wither
@AllArgsConstructor
@Getter
@ToString
@EqualsAndHashCode(of = { "correlationId" })
public class SystemData<K, V> {

  private static final Random r = new Random();
  private final long processed;
  private final long errors;
  private final Map<K, V> dataMap;
  private String correlationId;

  private SystemData(long processed, long errors, Map<K, V> dataMap) {
    this.processed = processed;
    this.errors = errors;
    this.dataMap = dataMap;
    this.correlationId = "" + r.nextLong();

  }
}

代码示例来源:origin: aol/micro-server

@AllArgsConstructor
  @Builder
  @XmlAccessorType(XmlAccessType.FIELD)
  @Getter
  public static class RequestData<T> extends BaseEventInfo {

    private final long correlationId;

    private final T query;

    private final String type;
    private final Object additionalData;
  }
}

代码示例来源:origin: lets-blade/blade

/**
 * NettyServerGroup
 *
 * @author biezhi
 * @date 2017/9/22
 */
@Builder
@Getter
public class NettyServerGroup {

  private Class<? extends ServerSocketChannel> socketChannel;
  private MultithreadEventLoopGroup            boosGroup;
  private MultithreadEventLoopGroup            workerGroup;
}

代码示例来源:origin: codecentric/spring-boot-admin

@Data
@Builder
public static class Section {
  private final String activityTitle;
  private final String activitySubtitle;
  @Builder.Default
  private final List<Fact> facts = new ArrayList<>();
}

代码示例来源:origin: aol/micro-server

@XmlRootElement(name = "register-entry")
@XmlType(name = "")
@Getter
@Wither
@Builder
@ToString
public class RegisterEntry {

代码示例来源:origin: lets-blade/blade

@Builder
class ParamStruct {

  Param          param;
  PathParam      pathParam;
  BodyParam      bodyParam;
  HeaderParam    headerParam;
  CookieParam    cookieParam;
  MultipartParam multipartParam;
  Type           argType;
  String         paramName;
  Request        request;
}

代码示例来源:origin: hs-web/hsweb-framework

/**
 * @author zhouhao
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SqlExecuteResult {

  private SqlInfo sqlInfo;

  private Object result;

  private boolean success;

}

代码示例来源:origin: apache/incubator-gobblin

@Getter
@ToString
@AllArgsConstructor
@Builder(builderMethodName = "hiddenBuilder")

代码示例来源:origin: deeplearning4j/nd4j

/**
 * This class is simple POJO that contains basic information about CustomOp
 *
 * @author raver119@gmail.com
 */
@AllArgsConstructor
@Builder
public class CustomOpDescriptor {
  @Getter private long hash;
  @Getter private int numInputs;
  @Getter private int numOutputs;
  @Getter private boolean allowsInplace;
  @Getter private int numTArgs;
  @Getter private int numIArgs;
}

代码示例来源:origin: hs-web/hsweb-framework

@Builder
@Getter
@Setter
class Error {
  int    sheetIndex;
  int    rowIndex;
  int    errorType;
  Object reason;
}

代码示例来源:origin: lets-blade/blade

/**
 * @author biezhi
 * @date 2017/10/19
 */
@Data
@Builder
public class Scanner {

  private String                      packageName;
  private boolean                     recursive;
  private Class<?>                    parent;
  private Class<? extends Annotation> annotation;
}

代码示例来源:origin: hs-web/hsweb-framework

/**
 * @author zhouhao
 * @since 3.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class SimplePosition implements Position {
  private static final long serialVersionUID = 1_0;
  private String id;

  private String name;

  private String code;

  private Department department;
}

相关文章

Builder类方法