Skip to content

Commit

Permalink
Merge pull request #64 from ramakocherlakota/class-name-substitutions
Browse files Browse the repository at this point in the history
updated CLASS_NAME_SUBSTITUTIONS to cover entire java.lang package
  • Loading branch information
dkoszewnik authored Jun 23, 2017
2 parents b60eb57 + bfc4645 commit 818f590
Showing 1 changed file with 94 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,102 @@ public class HollowCodeGenerationUtils {
private static final Map<String,String> CLASS_NAME_SUBSTITUTIONS = new HashMap<String,String>();

static {
CLASS_NAME_SUBSTITUTIONS.put("String", "HString");
CLASS_NAME_SUBSTITUTIONS.put("AbstractMethodError", "HAbstractMethodError");
CLASS_NAME_SUBSTITUTIONS.put("Appendable", "HAppendable");
CLASS_NAME_SUBSTITUTIONS.put("ArithmeticException", "HArithmeticException");
CLASS_NAME_SUBSTITUTIONS.put("ArrayIndexOutOfBoundsException", "HArrayIndexOutOfBoundsException");
CLASS_NAME_SUBSTITUTIONS.put("ArrayStoreException", "HArrayStoreException");
CLASS_NAME_SUBSTITUTIONS.put("AssertionError", "HAssertionError");
CLASS_NAME_SUBSTITUTIONS.put("AutoCloseable", "HAutoCloseable");
CLASS_NAME_SUBSTITUTIONS.put("Boolean", "HBoolean");
CLASS_NAME_SUBSTITUTIONS.put("BootstrapMethodError", "HBootstrapMethodError");
CLASS_NAME_SUBSTITUTIONS.put("Byte", "HByte");
CLASS_NAME_SUBSTITUTIONS.put("CharSequence", "HCharSequence");
CLASS_NAME_SUBSTITUTIONS.put("Character", "HCharacter");
CLASS_NAME_SUBSTITUTIONS.put("Class", "HClass");
CLASS_NAME_SUBSTITUTIONS.put("ClassCastException", "HClassCastException");
CLASS_NAME_SUBSTITUTIONS.put("ClassCircularityError", "HClassCircularityError");
CLASS_NAME_SUBSTITUTIONS.put("ClassFormatError", "HClassFormatError");
CLASS_NAME_SUBSTITUTIONS.put("ClassLoader", "HClassLoader");
CLASS_NAME_SUBSTITUTIONS.put("ClassNotFoundException", "HClassNotFoundException");
CLASS_NAME_SUBSTITUTIONS.put("ClassValue", "HClassValue");
CLASS_NAME_SUBSTITUTIONS.put("CloneNotSupportedException", "HCloneNotSupportedException");
CLASS_NAME_SUBSTITUTIONS.put("Cloneable", "HCloneable");
CLASS_NAME_SUBSTITUTIONS.put("Comparable", "HComparable");
CLASS_NAME_SUBSTITUTIONS.put("Compiler", "HCompiler");
CLASS_NAME_SUBSTITUTIONS.put("Deprecated", "HDeprecated");
CLASS_NAME_SUBSTITUTIONS.put("Double", "HDouble");
CLASS_NAME_SUBSTITUTIONS.put("Enum", "HEnum");
CLASS_NAME_SUBSTITUTIONS.put("EnumConstantNotPresentException", "HEnumConstantNotPresentException");
CLASS_NAME_SUBSTITUTIONS.put("Error", "HError");
CLASS_NAME_SUBSTITUTIONS.put("Exception", "HException");
CLASS_NAME_SUBSTITUTIONS.put("ExceptionInInitializerError", "HExceptionInInitializerError");
CLASS_NAME_SUBSTITUTIONS.put("Float", "HFloat");
CLASS_NAME_SUBSTITUTIONS.put("IllegalAccessError", "HIllegalAccessError");
CLASS_NAME_SUBSTITUTIONS.put("IllegalAccessException", "HIllegalAccessException");
CLASS_NAME_SUBSTITUTIONS.put("IllegalArgumentException", "HIllegalArgumentException");
CLASS_NAME_SUBSTITUTIONS.put("IllegalMonitorStateException", "HIllegalMonitorStateException");
CLASS_NAME_SUBSTITUTIONS.put("IllegalStateException", "HIllegalStateException");
CLASS_NAME_SUBSTITUTIONS.put("IllegalThreadStateException", "HIllegalThreadStateException");
CLASS_NAME_SUBSTITUTIONS.put("IncompatibleClassChangeError", "HIncompatibleClassChangeError");
CLASS_NAME_SUBSTITUTIONS.put("IndexOutOfBoundsException", "HIndexOutOfBoundsException");
CLASS_NAME_SUBSTITUTIONS.put("InheritableThreadLocal", "HInheritableThreadLocal");
CLASS_NAME_SUBSTITUTIONS.put("InstantiationError", "HInstantiationError");
CLASS_NAME_SUBSTITUTIONS.put("InstantiationException", "HInstantiationException");
CLASS_NAME_SUBSTITUTIONS.put("Integer", "HInteger");
CLASS_NAME_SUBSTITUTIONS.put("InternalError", "HInternalError");
CLASS_NAME_SUBSTITUTIONS.put("InterruptedException", "HInterruptedException");
CLASS_NAME_SUBSTITUTIONS.put("Iterable", "HIterable");
CLASS_NAME_SUBSTITUTIONS.put("LinkageError", "HLinkageError");
CLASS_NAME_SUBSTITUTIONS.put("Long", "HLong");
CLASS_NAME_SUBSTITUTIONS.put("Float", "HFloat");
CLASS_NAME_SUBSTITUTIONS.put("Double", "HDouble");
CLASS_NAME_SUBSTITUTIONS.put("Boolean", "HBoolean");
CLASS_NAME_SUBSTITUTIONS.put("Math", "HMath");
CLASS_NAME_SUBSTITUTIONS.put("NegativeArraySizeException", "HNegativeArraySizeException");
CLASS_NAME_SUBSTITUTIONS.put("NoClassDefFoundError", "HNoClassDefFoundError");
CLASS_NAME_SUBSTITUTIONS.put("NoSuchFieldError", "HNoSuchFieldError");
CLASS_NAME_SUBSTITUTIONS.put("NoSuchFieldException", "HNoSuchFieldException");
CLASS_NAME_SUBSTITUTIONS.put("NoSuchMethodError", "HNoSuchMethodError");
CLASS_NAME_SUBSTITUTIONS.put("NoSuchMethodException", "HNoSuchMethodException");
CLASS_NAME_SUBSTITUTIONS.put("NullPointerException", "HNullPointerException");
CLASS_NAME_SUBSTITUTIONS.put("Number", "HNumber");
CLASS_NAME_SUBSTITUTIONS.put("NumberFormatException", "HNumberFormatException");
CLASS_NAME_SUBSTITUTIONS.put("Object", "HObject");
CLASS_NAME_SUBSTITUTIONS.put("OutOfMemoryError", "HOutOfMemoryError");
CLASS_NAME_SUBSTITUTIONS.put("Override", "HOverride");
CLASS_NAME_SUBSTITUTIONS.put("Package", "HPackage");
CLASS_NAME_SUBSTITUTIONS.put("Process", "HProcess");
CLASS_NAME_SUBSTITUTIONS.put("ProcessBuilder", "HProcessBuilder");
CLASS_NAME_SUBSTITUTIONS.put("Readable", "HReadable");
CLASS_NAME_SUBSTITUTIONS.put("ReflectiveOperationException", "HReflectiveOperationException");
CLASS_NAME_SUBSTITUTIONS.put("Runnable", "HRunnable");
CLASS_NAME_SUBSTITUTIONS.put("Runtime", "HRuntime");
CLASS_NAME_SUBSTITUTIONS.put("RuntimeException", "HRuntimeException");
CLASS_NAME_SUBSTITUTIONS.put("RuntimePermission", "HRuntimePermission");
CLASS_NAME_SUBSTITUTIONS.put("SafeVarargs", "HSafeVarargs");
CLASS_NAME_SUBSTITUTIONS.put("SecurityException", "HSecurityException");
CLASS_NAME_SUBSTITUTIONS.put("SecurityManager", "HSecurityManager");
CLASS_NAME_SUBSTITUTIONS.put("Short", "HShort");
CLASS_NAME_SUBSTITUTIONS.put("StackOverflowError", "HStackOverflowError");
CLASS_NAME_SUBSTITUTIONS.put("StackTraceElement", "HStackTraceElement");
CLASS_NAME_SUBSTITUTIONS.put("StrictMath", "HStrictMath");
CLASS_NAME_SUBSTITUTIONS.put("String", "HString");
CLASS_NAME_SUBSTITUTIONS.put("StringBuffer", "HStringBuffer");
CLASS_NAME_SUBSTITUTIONS.put("StringBuilder", "HStringBuilder");
CLASS_NAME_SUBSTITUTIONS.put("StringIndexOutOfBoundsException", "HStringIndexOutOfBoundsException");
CLASS_NAME_SUBSTITUTIONS.put("SuppressWarnings", "HSuppressWarnings");
CLASS_NAME_SUBSTITUTIONS.put("System", "HSystem");
CLASS_NAME_SUBSTITUTIONS.put("Thread", "HThread");
CLASS_NAME_SUBSTITUTIONS.put("ThreadDeath", "HThreadDeath");
CLASS_NAME_SUBSTITUTIONS.put("ThreadGroup", "HThreadGroup");
CLASS_NAME_SUBSTITUTIONS.put("ThreadLocal", "HThreadLocal");
CLASS_NAME_SUBSTITUTIONS.put("Throwable", "HThrowable");
CLASS_NAME_SUBSTITUTIONS.put("TypeNotPresentException", "HTypeNotPresentException");
CLASS_NAME_SUBSTITUTIONS.put("UnknownError", "HUnknownError");
CLASS_NAME_SUBSTITUTIONS.put("UnsatisfiedLinkError", "HUnsatisfiedLinkError");
CLASS_NAME_SUBSTITUTIONS.put("UnsupportedClassVersionError", "HUnsupportedClassVersionError");
CLASS_NAME_SUBSTITUTIONS.put("UnsupportedOperationException", "HUnsupportedOperationException");
CLASS_NAME_SUBSTITUTIONS.put("VerifyError", "HVerifyError");
CLASS_NAME_SUBSTITUTIONS.put("VirtualMachineError", "HVirtualMachineError");
CLASS_NAME_SUBSTITUTIONS.put("Void", "HVoid");
}

public static String typeAPIClassname(String typeName) {
Expand Down

0 comments on commit 818f590

Please sign in to comment.