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