本文整理汇总了Java中net.java.html.json.ComputedProperty类的典型用法代码示例。如果您正苦于以下问题:Java ComputedProperty类的具体用法?Java ComputedProperty怎么用?Java ComputedProperty使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ComputedProperty类属于net.java.html.json包,在下文中一共展示了ComputedProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty static String validate(
String firstName, String lastName, Address address, List<Phone> phones
) {
String res = null;
if (firstName == null || firstName.isEmpty()) {
res = "Specify first name";
}
if (res == null && (lastName == null || lastName.isEmpty())) {
res = "Specify last name";
}
if (res == null && address != null) {
res = address.getValidate();
}
if (phones != null) for (Phone phone : phones) {
if (res == null) {
res = phone.getValidate();
}
}
return res;
}
示例2: archetypeOpen
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String archetypeOpen(ArchetypeData archetype) {
StringBuilder sb = new StringBuilder();
if (archetype != null) {
for (String item : archetype.getOpen()) {
if (sb.length() > 0) {
sb.append(",");
}
sb.append(item);
}
}
return sb.length() == 0 ? null : sb.toString();
}
示例3: errorCode
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static int errorCode(
String current,
boolean android,
String androidSdkPath,
boolean netbeans,
boolean nbInstallationDefined,
boolean ios, boolean iosMoe, boolean iosRoboVM,
Device selectedSimulator,
String warning
) {
if (android && "platforms".equals(current)) { // NOI18N
if (androidSdkPath == null) {
return 7;
}
if (!isValidAndroidSdk(new File(androidSdkPath))) {
return 7;
}
}
if (netbeans && "platforms".equals(current)) { // NOI18N
if (!nbInstallationDefined) {
return 8;
}
}
if (warning != null) {
return 6;
}
if (ios) {
if (!iosMoe && !iosRoboVM) {
return 3;
}
if (selectedSimulator == null || MavenUtilities.getDefault().readMoeDevice() == null) {
return 4;
}
}
return 0;
}
示例4: fullName
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty static String fullName(
String firstName, String lastName
) {
if (firstName == null) {
return lastName;
}
if (lastName == null) {
return firstName;
}
return firstName + " " + lastName;
}
示例5: callInfo
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty static String callInfo(
List<Phone> phones
) {
StringBuilder sb = new StringBuilder();
String sep = "";
for (Phone p : phones) {
sb.append(sep).append(p.getNumber());
sep = ", ";
}
return sb.toString();
}
示例6: message
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty static String message(String current) {
return "Three".equals(current) ? "Finished" : null;
}
示例7: archetypeGroupId
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String archetypeGroupId(ArchetypeData archetype) {
return archetype == null ? null : archetype.getGroupId();
}
示例8: archetypeArtifactId
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String archetypeArtifactId(ArchetypeData archetype) {
return archetype == null ? null : archetype.getArtifactId();
}
示例9: archetypeVersion
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String archetypeVersion(ArchetypeData archetype) {
return archetype == null ? null : archetype.getVersion();
}
示例10: webpath
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String webpath(boolean web) {
return web ? "client-web" : null;
}
示例11: androidpath
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String androidpath(boolean android) {
return android ? "client-android" : null;
}
示例12: iospath
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String iospath(boolean iosRoboVM) {
return iosRoboVM ? "client-ios" : null;
}
示例13: moepath
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String moepath(boolean iosMoe) {
return iosMoe ? "client-moe" : null;
}
示例14: netbeanspath
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String netbeanspath(boolean netbeans) {
return netbeans ? "client-netbeans" : null;
}
示例15: example
import net.java.html.json.ComputedProperty; //导入依赖的package包/类
@ComputedProperty
static String example(boolean installExample) {
return Boolean.toString(installExample);
}