Class BuildUtils


  • public final class BuildUtils
    extends Object
    • Method Detail

      • getInternalTypes

        public static String[] getInternalTypes​(String[] superClasses)
      • getGenericTypes

        public static String getGenericTypes​(String[] interfaces)
      • getInternalType

        public static String getInternalType​(String type)
        Returns the corresponding internal type representation for the given type. I decided to not use the ASM Type class methods because they require resolving the actual type into a Class instance and at this point, I think it is best to delay type resolution until it is really needed.
        Parameters:
        type -
        Returns:
      • getTypeDescriptor

        public static String getTypeDescriptor​(String type)
        Returns the corresponding type descriptor for the given type. I decided to not use the ASM Type class methods because they require resolving the actual type into a Class instance and at this point, I think it is best to delay type resolution until it is really needed.
        Parameters:
        type -
        Returns:
      • arrayType

        public static String arrayType​(String type)
      • externalArrayDimSize

        public static int externalArrayDimSize​(String className)
      • arrayDimSize

        public static int arrayDimSize​(String type)
      • isPrimitive

        public static boolean isPrimitive​(String type)
        Returns true if the provided type is a primitive type
        Parameters:
        type -
        Returns:
      • isArray

        public static boolean isArray​(String type)
        Returns true if the provided type is an arrayType Can only be used with internal names, i.e. after [ has been prefix
        Parameters:
        type -
        Returns:
      • isBoxed

        public static boolean isBoxed​(String type)
      • sizeOf

        public static int sizeOf​(String type)
      • isBoolean

        public static boolean isBoolean​(String type)
      • setterName

        public static String setterName​(String fieldName)
      • extractor

        public static String extractor​(String type)
      • numericMorph

        public static String numericMorph​(String type)
      • serializationWriterName

        public static String serializationWriterName​(String type)
      • serializationReaderName

        public static String serializationReaderName​(String type)
      • serializationType

        public static String serializationType​(String type)