Beispiel #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);
  }
Beispiel #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);
 }
Beispiel #3
0
 public static boolean canBeClass(BcTypeNode type) {
   return canBeClass(type.getName());
 }
Beispiel #4
0
 public static boolean isBasicType(BcTypeNode type) {
   return isBasicType(type.getName());
 }