[Swift-commit] r3484 - trunk/src/org/griphyn/vdl/type

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Jul 28 14:35:27 CDT 2010


Author: hategan
Date: 2010-07-28 14:35:27 -0500 (Wed, 28 Jul 2010)
New Revision: 3484

Modified:
   trunk/src/org/griphyn/vdl/type/Types.java
Log:
added isPrimitive()

Modified: trunk/src/org/griphyn/vdl/type/Types.java
===================================================================
--- trunk/src/org/griphyn/vdl/type/Types.java	2010-07-28 19:35:07 UTC (rev 3483)
+++ trunk/src/org/griphyn/vdl/type/Types.java	2010-07-28 19:35:27 UTC (rev 3484)
@@ -26,6 +26,16 @@
 			return type;
 		}
 	}
+	
+	public static boolean isPrimitive(String name) {
+	    try {
+	        Type t = getType(name);
+	        return t.isPrimitive();
+	    }
+	    catch (NoSuchTypeException e) {
+	        return false;
+	    }
+	}
 
 	//TODO: check duplicate type?
 	public synchronized static void addType(Type type) {




More information about the Swift-commit mailing list