本文整理了Java中org.apache.juneau.annotation.Bean
类的一些代码示例,展示了Bean
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bean
类的具体详情如下:
包路径:org.apache.juneau.annotation.Bean
类名称:Bean
暂无
代码示例来源: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: org.apache.juneau/juneau-marshall
if (! b.properties().isEmpty())
properties(split(b.properties()));
if (! b.typeName().isEmpty())
typeName(b.typeName());
if (b.sort())
sortProperties(true);
if (b.fluentSetters())
fluentSetters(true);
if (! b.excludeProperties().isEmpty())
excludeProperties(split(b.excludeProperties()));
if (b.propertyNamer() != PropertyNamerDefault.class)
propertyNamer(b.propertyNamer());
if (b.interfaceClass() != Object.class)
interfaceClass(b.interfaceClass());
if (b.stopClass() != Object.class)
stopClass(b.stopClass());
if (b.beanDictionary().length > 0)
beanDictionary(b.beanDictionary());
if (b.propertyFilter() != PropertyFilter.class)
propertyFilter(b.propertyFilter());
代码示例来源:origin: apache/juneau
if (! b.properties().isEmpty())
properties(split(b.properties()));
if (! b.typeName().isEmpty())
typeName(b.typeName());
if (b.sort())
sortProperties(true);
if (b.fluentSetters())
fluentSetters(true);
if (! b.excludeProperties().isEmpty())
excludeProperties(split(b.excludeProperties()));
if (b.propertyNamer() != PropertyNamerDefault.class)
propertyNamer(b.propertyNamer());
if (b.interfaceClass() != Object.class)
interfaceClass(b.interfaceClass());
if (b.stopClass() != Object.class)
stopClass(b.stopClass());
if (b.beanDictionary().length > 0)
beanDictionary(b.beanDictionary());
if (b.propertyFilter() != PropertyFilter.class)
propertyFilter(b.propertyFilter());
代码示例来源: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
if (! b.properties().isEmpty())
properties(split(b.properties()));
if (! b.typeName().isEmpty())
typeName(b.typeName());
if (b.sort())
sortProperties(true);
if (b.fluentSetters())
fluentSetters(true);
if (! b.excludeProperties().isEmpty())
excludeProperties(split(b.excludeProperties()));
if (b.propertyNamer() != PropertyNamerDefault.class)
propertyNamer(b.propertyNamer());
if (b.interfaceClass() != Object.class)
interfaceClass(b.interfaceClass());
if (b.stopClass() != Object.class)
stopClass(b.stopClass());
if (b.beanDictionary().length > 0)
beanDictionary(b.beanDictionary());
if (b.propertyFilter() != PropertyFilter.class)
propertyFilter(b.propertyFilter());
代码示例来源: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
if (! b.properties().isEmpty())
properties(split(b.properties()));
if (! b.typeName().isEmpty())
typeName(b.typeName());
if (b.sort())
sortProperties(true);
if (b.fluentSetters())
fluentSetters(true);
if (! b.excludeProperties().isEmpty())
excludeProperties(split(b.excludeProperties()));
if (b.propertyNamer() != PropertyNamerDefault.class)
propertyNamer(b.propertyNamer());
} catch (Exception e) {
throw new RuntimeException(e);
if (b.interfaceClass() != Object.class)
interfaceClass(b.interfaceClass());
if (b.stopClass() != Object.class)
stopClass(b.stopClass());
if (b.beanDictionary().length > 0)
beanDictionary(b.beanDictionary());
代码示例来源: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
if (! b.properties().isEmpty())
properties(split(b.properties()));
if (! b.typeName().isEmpty())
typeName(b.typeName());
if (b.sort())
sortProperties(true);
if (b.fluentSetters())
fluentSetters(true);
if (! b.excludeProperties().isEmpty())
excludeProperties(split(b.excludeProperties()));
if (b.propertyNamer() != PropertyNamerDefault.class)
propertyNamer(b.propertyNamer());
} catch (Exception e) {
throw new RuntimeException(e);
if (b.interfaceClass() != Object.class)
interfaceClass(b.interfaceClass());
if (b.stopClass() != Object.class)
stopClass(b.stopClass());
if (b.beanDictionary().length > 0)
beanDictionary(b.beanDictionary());
代码示例来源:origin: apache/juneau
@Bean(typeName="bar")
public static class J2 {
public int f2 = 2;
public int f3 = 3;
}
代码示例来源:origin: org.apache.juneau/juneau-marshall
if (! b.properties().isEmpty())
properties(split(b.properties()));
if (! b.typeName().isEmpty())
typeName(b.typeName());
if (b.sort())
sortProperties(true);
if (b.fluentSetters())
fluentSetters(true);
if (! b.excludeProperties().isEmpty())
excludeProperties(split(b.excludeProperties()));
if (b.propertyNamer() != PropertyNamerDefault.class)
propertyNamer(b.propertyNamer());
} catch (Exception e) {
throw new RuntimeException(e);
if (b.interfaceClass() != Object.class)
interfaceClass(b.interfaceClass());
if (b.stopClass() != Object.class)
stopClass(b.stopClass());
if (b.beanDictionary().length > 0)
beanDictionary(b.beanDictionary());
代码示例来源: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;
}
}
内容来源于网络,如有侵权,请联系作者删除!