コード例 #1
0
 @Override
 public JType visit(PrimitiveType type, JCodeModel codeModel) {
   switch (type.getType()) {
     case Boolean:
       return codeModel.BOOLEAN;
     case Char:
       return codeModel.CHAR;
     case Byte:
       return codeModel.BYTE;
     case Short:
       return codeModel.SHORT;
     case Int:
       return codeModel.INT;
     case Long:
       return codeModel.LONG;
     case Float:
       return codeModel.FLOAT;
     case Double:
       return codeModel.DOUBLE;
     default:
       throw new AssertionError("Unknown primitive type [" + type.getType() + "]");
   }
 }
コード例 #2
0
ファイル: DefinitionVisitor.java プロジェクト: ElliotCP/701A2
 public void visit(PrimitiveType n, Object arg) {
   switch (n.getType()) {
     case Boolean:
       break;
     case Byte:
       break;
     case Char:
       break;
     case Double:
       break;
     case Float:
       break;
     case Int:
       break;
     case Long:
       break;
     case Short:
       break;
   }
 }