首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 将LED是一个小的java库绑定对象的属性在运行时使用注释,减少样板代码。

将LED是一个小的java库绑定对象的属性在运行时使用注释,减少样板代码。

资 源 简 介

objectify-led is a small Java library for binding object or class properties at runtime using annotations, reducing boilerplate code. Values can be taken from the System, from properties files, any arbitrary source in fact, and automatically set on properties. Instead of having chunks of code such as ``` public class Foo { private static String BLAH = "default-value"; private String myString; private int myInt = -1; public static void main(String[] args) { if (System.getProperty("blah.value) != null) { BLAH = System.getProperty("blah.value"); } Foo foo = new Foo(); if (System.getProperty("mystring.value) != null) { foo.myString = System.getProperty("mystring.value"); } if (System.getProperty("myint.value) != null) { try { String intValue = System.getProperty("myint.value"); foo.myInt = Integer.pa

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP