--- /dev/null
+/*\r
+ * Copyright (C) 2009 The Android Open Source Project\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package signature.model.impl;\r
+\r
+import signature.model.IPrimitiveType;\r
+\r
+public enum SigPrimitiveType implements IPrimitiveType {\r
+ VOID_TYPE("void"), BOOLEAN_TYPE("boolean"), BYTE_TYPE("byte"), CHAR_TYPE(\r
+ "char"), SHORT_TYPE("short"), INT_TYPE("int"), LONG_TYPE("long"),\r
+ FLOAT_TYPE("float"), DOUBLE_TYPE("double");\r
+\r
+ private String name;\r
+\r
+ private SigPrimitiveType(String name) {\r
+ this.name = name;\r
+ }\r
+\r
+ public static SigPrimitiveType valueOfTypeName(String name) {\r
+ for (SigPrimitiveType primitive : values()) {\r
+ if (primitive.name.equals(name)) {\r
+ return primitive;\r
+ }\r
+ }\r
+ throw new IllegalArgumentException(name + " is not a primitive type");\r
+ }\r
+\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ @Override\r
+ public String toString() {\r
+ return name;\r
+ }\r
+}\r