程序包 cn.wjybxx.base

类 Constant.Builder

java.lang.Object
cn.wjybxx.base.Constant.Builder
封闭接口:
Constant

public abstract static class Constant.Builder extends Object
  • 构造器详细资料

    • Builder

      public Builder(String name)
  • 方法详细资料

    • setId

      public Constant.Builder setId(Object declaringPool, int id)
      设置常量的id - id通常由管理常量的常量池分配
    • getIdOrThrow

      public int getIdOrThrow()
    • getId

      public Integer getId()
    • getName

      public String getName()
    • getDeclaringPool

      public Object getDeclaringPool()
    • setCacheIndex

      public Constant.Builder setCacheIndex(int cacheIndex)
      设置高速缓存索引 -- 该方法由ConstantPool调用
    • getCacheIndex

      public int getCacheIndex()
      获取分配的高速缓存索引 -- -1表示未设置。 注意:ConstantPool仅仅分配index,而真正的实现在于常量的使用者。
    • isRequireCacheIndex

      public boolean isRequireCacheIndex()
    • setRequireCacheIndex

      public Constant.Builder setRequireCacheIndex(boolean requireCacheIndex)
      设置是否需要分配高速缓存索引
    • build

      public abstract Constant build()