示例#1
0
  public static String type(BcTypeNode bcType) {
    String typeName = bcType.getName();
    if (bcType instanceof BcVectorTypeNode) {
      BcVectorTypeNode vectorType = (BcVectorTypeNode) bcType;
      String genericName = BcCodeCpp.type(vectorType.getGeneric());
      return BcCodeCpp.VECTOR_TYPE_PREFIX + genericName;
    }

    return type(typeName);
  }
示例#2
0
 public static String construct(BcTypeNode type, Object initializer) {
   if (type instanceof BcVectorTypeNode) {
     BcVectorTypeNode vectorType = (BcVectorTypeNode) type;
     return NEWVECTOR
         + "("
         + VECTOR_TYPE_PREFIX
         + type(vectorType.getGeneric())
         + ", ("
         + initializer
         + "))";
   }
   return construct(type.getName(), initializer);
 }
示例#3
0
 public static boolean canBeClass(BcTypeNode type) {
   return canBeClass(type.getName());
 }
示例#4
0
 public static boolean isBasicType(BcTypeNode type) {
   return isBasicType(type.getName());
 }