org.jboss.errai.codegen.meta.MetaClass.asArrayOf()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(110)

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

MetaClass.asArrayOf介绍

暂无

代码示例

代码示例来源:origin: errai/errai

@Override
public ArrayInitializationBuilder newArray(MetaClass componentType, Object... dimensions) {
 this.type = componentType.asArrayOf(dimensions.length == 0 ? 1 : dimensions.length);
 this.componentType = componentType;
 this.dimensions = dimensions;
 return this;
}

代码示例来源:origin: org.jboss.errai/errai-codegen

@Override
public ArrayInitializationBuilder newArray(MetaClass componentType, Object... dimensions) {
 this.type = componentType.asArrayOf(dimensions.length == 0 ? 1 : dimensions.length);
 this.componentType = componentType;
 this.dimensions = dimensions;
 return this;
}

代码示例来源:origin: errai/errai

public ArrayLiteral(final Object value) {
 super(value);
 Class<?> type = value.getClass();
 int dim = 0;
 while (type.isArray()) {
  dim++;
  type = type.getComponentType();
 }
 this.dimensions = dim;
 
 if (MetaClass.class.isAssignableFrom(type)) {
  type = Class.class;
 }
 else if (MetaType.class.isAssignableFrom(type)) {
  type = Type.class;
 }
 
 this.arrayType = type;
 mArrayType = MetaClassFactory.get(arrayType).asArrayOf(dim);
}

代码示例来源:origin: org.jboss.errai/errai-codegen

public ArrayLiteral(final Object value) {
 super(value);
 Class<?> type = value.getClass();
 int dim = 0;
 while (type.isArray()) {
  dim++;
  type = type.getComponentType();
 }
 this.dimensions = dim;
 
 if (MetaClass.class.isAssignableFrom(type)) {
  type = Class.class;
 }
 else if (MetaType.class.isAssignableFrom(type)) {
  type = Type.class;
 }
 
 this.arrayType = type;
 mArrayType = MetaClassFactory.get(arrayType).asArrayOf(dim);
}

代码示例来源:origin: errai/errai

@Override
 public MetaClass getType() {
  final MetaClass ret;
  final int dims = GenUtil.getArrayDimensions(ref.getType());
  if (ref.getType().isArray() && idx.length > 0) {
   final int newDims = dims - idx.length;
   if (newDims > 0) {
    ret = ref.getType().getOuterComponentType().asArrayOf(dims - idx.length);
   }
   else {
    ret = ref.getType().getOuterComponentType();
   }
  }
  else {
   ret = ref.getType();
  }
  return ret;
 }
};

代码示例来源:origin: org.jboss.errai/errai-codegen

@Override
 public MetaClass getType() {
  final MetaClass ret;
  final int dims = GenUtil.getArrayDimensions(ref.getType());
  if (ref.getType().isArray() && idx.length > 0) {
   final int newDims = dims - idx.length;
   if (newDims > 0) {
    ret = ref.getType().getOuterComponentType().asArrayOf(dims - idx.length);
   }
   else {
    ret = ref.getType().getOuterComponentType();
   }
  }
  else {
   ret = ref.getType();
  }
  return ret;
 }
};

代码示例来源:origin: errai/errai

addArrayMarshaller(def.getMappingClass().asArrayOf(1));

代码示例来源:origin: org.jboss.errai/errai-marshalling

addArrayMarshaller(def.getMappingClass().asArrayOf(1));

代码示例来源:origin: org.jboss.errai/errai-marshalling

final MetaClass arrayOfArrayType = arrayType.asArrayOf(1);
  Parameter.of(toMap.asArrayOf(dimensions), "a0"), Parameter.of(MarshallingSession.class, "a1"));

代码示例来源:origin: errai/errai

final MetaClass arrayOfArrayType = arrayType.asArrayOf(1);
  Parameter.of(toMap.asArrayOf(dimensions), "a0"), Parameter.of(MarshallingSession.class, "a1"));

代码示例来源:origin: errai/errai

final MetaClass arrayType = toMap.asArrayOf(1);
classStructureBuilder.privateField("EMPTY_ARRAY", arrayType).initializesWith(Stmt.newArray(toMap, 0)).finish();

代码示例来源:origin: errai/errai

dimParms[0] = Stmt.loadVariable("a0").invoke("size");
final MetaClass arrayType = toMap.asArrayOf(dim);

代码示例来源:origin: org.jboss.errai/errai-marshalling

dimParms[0] = Stmt.loadVariable("a0").invoke("size");
final MetaClass arrayType = toMap.asArrayOf(dim);

代码示例来源:origin: org.jboss.errai/errai-marshalling

final MetaClass arrayType = toMap.asArrayOf(1);
classStructureBuilder.privateField("EMPTY_ARRAY", arrayType).initializesWith(Stmt.newArray(toMap, 0)).finish();

相关文章