@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() + "]"); } }
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; } }