org.apache.juneau.annotation.Bean.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(109)

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

Bean.<init>介绍

暂无

代码示例

代码示例来源:origin: apache/juneau

@Bean(beanDictionary={B.class})
public static class BeanWithPropertiesWithArrayTypeNames {
  public B[] b1;
  public Object[] b2;
  public Object[] b3;
  BeanWithPropertiesWithArrayTypeNames init() {
    b1 = new B[]{new B().init()};
    b2 = new B[]{new B().init()};
    b3 = new Object[]{new B().init()};
    return this;
  }
}

代码示例来源:origin: apache/juneau

@Bean(beanDictionary={B.class})
public static class BeanWithPropertiesWith2dArrayTypeNames {
  public B[][] b1;
  public Object[][] b2;
  public Object[][] b3;
  BeanWithPropertiesWith2dArrayTypeNames init() {
    b1 = new B[][]{{new B().init()}};
    b2 = new B[][]{{new B().init()}};
    b3 = new Object[][]{{new B().init()}};
    return this;
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="A")
  public static class B {
    @Xml(format=ATTR) public String f1;
    @Xml(format=TEXT) public String f2;

    public static B newInstance() {
      B t = new B();
      t.f1 = "f1";
      t.f2 = null;
      return t;
    }
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="B")
public static class B {
  public A f2a;
  public AA f2b;
  public IA f2c;
  public Object f2d;
  public B() {}
  public B(String f1) {
    f2d = f2c = f2b = f2a = new A(f1);
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="bar")
public static class J2 {
  public int f2 = 2;
  public int f3 = 3;
}

代码示例来源:origin: apache/juneau

@org.apache.juneau.annotation.Bean(typeName="TypedBeanImpl", sort=true)
public class TypedBeanImpl implements TypedBean {
  public int a;
  public String b;

  public TypedBeanImpl init() {
    this.a = 1;
    this.b = "foo";
    return this;
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="H")
public static class H {
  public HEnum enum1;
  private HEnum enum2;
  public HEnum getEnum2() {
    return enum2;
  }
  public void setEnum2(HEnum enum2) {
    this.enum2 = enum2;
  }
}

代码示例来源:origin: apache/juneau

@Bean(stopClass=W.class)
public static class W3 extends W2 {
  public String getA5() {return "5";}
  public String getA6() {return "6";}
}

代码示例来源:origin: apache/juneau

@Bean(typeName="B")
  public static class B implements IB {
    public int b;

    public B init() {
      b = 1;
      return this;
    }
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="X")
public static class BeanWithTypeName {
  public int a;
  public String b;
  BeanWithTypeName init() {
    a = 123;
    b = "foo";
    return this;
  }
}

代码示例来源:origin: apache/juneau

@Bean(beanDictionary={B.class})
public static class BeanWithPropertiesWithTypeNames {
  public B b1;
  public Object b2;
  BeanWithPropertiesWithTypeNames init() {
    b1 = new B().init();
    b2 = new B().init();
    return this;
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="X")
public static class BeanX {
  public String fx;
  BeanX init() {
    fx = "fx1";
    return this;
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="  \b\f\n\t\r  ")
public static class BeanWithSpecialCharacters2 {
  @BeanProperty(name="  \b\f\n\t\r  ")
  public String a;
  BeanWithSpecialCharacters2 init() {
    a = "  \b\f\n\t\r  ";
    return this;
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="B2")
public static class B2 extends B {
  public int f2;
  public static B2 create() {
    B2 b = new B2();
    b.f0 = "f0";
    b.f2 = 1;
    return b;
  }
}

代码示例来源:origin: apache/juneau

@Bean(fluentSetters=true)
public static class Builder {
  private A f1;
  public Builder f1(A f1) {
    this.f1 = f1;
    return this;
  }
  public A2 build() {
    return new A2(this);
  }
}

代码示例来源:origin: apache/juneau

@Bean(stopClass=D2.class)
public class D2 extends D1 {
  public int f2 = 2;
  public int getP2() { return 2; }
}

代码示例来源:origin: apache/juneau

@Bean(beanDictionary={A1.class, A2.class})
public static abstract class A {
  public String f0 = "f0";
  public B fb;
}

代码示例来源:origin: apache/juneau

@Bean(
  beanDictionary={B1.class,B2.class,B3.class}
)
public abstract static class B {
  public String f0 = "f0";
}

代码示例来源:origin: apache/juneau

@Bean(typeName="B1")
public static class B1 extends B {
  public String f1;
  public static B1 create() {
    B1 b = new B1();
    b.f0 = "f0";
    b.f1 = "f1";
    return b;
  }
}

代码示例来源:origin: apache/juneau

@Bean(typeName="xf1")
public static class F1 {
  @Xml(format=TEXT)
  public String text;
  public static F1 newInstance(String text) {
    F1 t = new F1();
    t.text = text;
    return t;
  }
}

相关文章