예제 #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());
 }