本文整理了Java中org.jboss.errai.codegen.meta.MetaClass.asBoxed()
方法的一些代码示例,展示了MetaClass.asBoxed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaClass.asBoxed()
方法的具体详情如下:
包路径:org.jboss.errai.codegen.meta.MetaClass
类名称:MetaClass
方法名:asBoxed
暂无
代码示例来源:origin: errai/errai
@Override
public MetaClass getTargetType() {
return targetType.asBoxed();
}
代码示例来源:origin: errai/errai
@Override
public void setType(final MetaClass type) {
this.type = type.asBoxed();
}
代码示例来源:origin: org.jboss.errai/errai-marshalling
@Override
public MetaClass getType() {
return type.asBoxed();
}
代码示例来源:origin: errai/errai
@Override
public boolean hasBuiltInDefinition(final MetaClass type) {
return typesWithBuiltInMarshallers.contains(type.asBoxed());
}
}
代码示例来源:origin: org.jboss.errai/errai-marshalling
@Override
public boolean hasBuiltInDefinition(final MetaClass type) {
return typesWithBuiltInMarshallers.contains(type.asBoxed());
}
}
代码示例来源:origin: errai/errai
protected SimpleMapping(final String key, final MetaClass targetType) {
if (key == null) {
throw new NullPointerException("key is null");
}
this.type = targetType.asBoxed();
this.targetType = targetType.getErased().asBoxed();
this.key = key;
}
代码示例来源:origin: org.jboss.errai/errai-marshalling
protected SimpleMapping(final String key, final MetaClass targetType) {
if (key == null) {
throw new NullPointerException("key is null");
}
this.type = targetType.asBoxed();
this.targetType = targetType.getErased().asBoxed();
this.key = key;
}
代码示例来源:origin: org.jboss.errai/errai-codegen
@Override
public boolean canBeApplied(MetaClass clazz) {
if (constraints.length == 0) return true;
return Arrays.stream(constraints).anyMatch(mc -> mc.asBoxed().isAssignableFrom(clazz.asBoxed()));
}
}
代码示例来源:origin: errai/errai
@Override
public boolean canBeApplied(MetaClass clazz) {
if (constraints.length == 0) return true;
return Arrays.stream(constraints).anyMatch(mc -> mc.asBoxed().isAssignableFrom(clazz.asBoxed()));
}
}
代码示例来源:origin: errai/errai
private String createDemarshallerIfNeeded(final MetaClass type) {
if (done) {
return getVarName(type);
}
return addArrayMarshaller(type.asBoxed(), target == MarshallerOutputTarget.GWT);
}
代码示例来源:origin: org.jboss.errai/errai-marshalling
private String createDemarshallerIfNeeded(final MetaClass type) {
if (done) {
return getVarName(type);
}
return addArrayMarshaller(type.asBoxed(), target == MarshallerOutputTarget.GWT);
}
代码示例来源:origin: org.jboss.errai/errai-bus
private Statement generateRequest(ClassStructureBuilder<?> classBuilder,
MetaMethod method, Statement methodParams, boolean intercepted) {
final Statement sendable = Stmt
.invokeStatic(MessageBuilder.class, "createCall")
.invoke("call", remote.getFullyQualifiedName())
.invoke("endpoint", ProxyUtil.createCallSignature(method),
Stmt.loadClassMember("qualifiers"),
methodParams)
.invoke("respondTo", method.getReturnType().asBoxed(), Stmt.loadVariable("remoteCallback"))
.invoke("errorsHandledBy", Stmt.loadVariable("errorCallback"));
final BlockStatement requestBlock = new BlockStatement();
requestBlock.addStatement(Stmt.declareVariable("sendable", RemoteCallSendable.class, sendable));
requestBlock.addStatement(Stmt.loadStatic(classBuilder.getClassDefinition(), "this")
.invoke("sendRequest", Variable.get("bus"), Variable.get("sendable")));
return requestBlock;
}
}
代码示例来源:origin: errai/errai
public static boolean isNumericallyCoercible(final MetaClass target, final MetaClass parm) {
MetaClass boxedTarget = target.isPrimitive() ? target.asBoxed() : target;
if (boxedTarget != null && Number_MetaClass.isAssignableFrom(target)) {
if ((boxedTarget = parm.isPrimitive() ? parm.asBoxed() : parm) != null) {
return Number_MetaClass.isAssignableFrom(boxedTarget);
}
}
return false;
}
代码示例来源:origin: org.jboss.errai/errai-codegen
public static boolean isNumericallyCoercible(final MetaClass target, final MetaClass parm) {
MetaClass boxedTarget = target.isPrimitive() ? target.asBoxed() : target;
if (boxedTarget != null && Number_MetaClass.isAssignableFrom(target)) {
if ((boxedTarget = parm.isPrimitive() ? parm.asBoxed() : parm) != null) {
return Number_MetaClass.isAssignableFrom(boxedTarget);
}
}
return false;
}
代码示例来源:origin: errai/errai
private void checkSwitchExprType() {
final boolean validType = supportedTypes.stream()
.anyMatch(cls -> MetaClassFactory.get(cls).isAssignableFrom(switchExprStmt.getType().asBoxed()));
if (!validType)
throw new InvalidTypeException("Type not permitted in switch statements:" +
switchExprStmt.getType().getFullyQualifiedName());
}
}
代码示例来源:origin: org.jboss.errai/errai-codegen
private void checkSwitchExprType() {
final boolean validType = supportedTypes.stream()
.anyMatch(cls -> MetaClassFactory.get(cls).isAssignableFrom(switchExprStmt.getType().asBoxed()));
if (!validType)
throw new InvalidTypeException("Type not permitted in switch statements:" +
switchExprStmt.getType().getFullyQualifiedName());
}
}
代码示例来源:origin: errai/errai
@Override
public Statement demarshall(final MetaClass type, final Statement value) {
final String variable = createDemarshallerIfNeeded(type.asBoxed());
return Stmt.loadVariable(variable).invoke("demarshall", value, Stmt.loadVariable("a1"));
}
代码示例来源:origin: org.jboss.errai/errai-marshalling
@Override
public Statement demarshall(final MetaClass type, final Statement value) {
final String variable = createDemarshallerIfNeeded(type.asBoxed());
return Stmt.loadVariable(variable).invoke("demarshall", value, Stmt.loadVariable("a1"));
}
代码示例来源:origin: errai/errai
public static String getVarName(final MetaClass clazz) {
return clazz.isArray()
? getArrayVarName(clazz.getOuterComponentType().getFullyQualifiedName())
+ "_D" + GenUtil.getArrayDimensions(clazz)
: getVarName(clazz.asBoxed().getFullyQualifiedName());
}
代码示例来源:origin: org.jboss.errai/errai-marshalling
public static String getVarName(final MetaClass clazz) {
return clazz.isArray()
? getArrayVarName(clazz.getOuterComponentType().getFullyQualifiedName())
+ "_D" + GenUtil.getArrayDimensions(clazz)
: getVarName(clazz.asBoxed().getFullyQualifiedName());
}
内容来源于网络,如有侵权,请联系作者删除!