Example #1
0
        public virtual CompilerTypeInformation getCompilerTypeInformation(Type type)
        {
            CompilerTypeInformation compilerTypeInformation = compilerTypeInformations[type];

            if (compilerTypeInformation == null)
            {
                compilerTypeInformation = defaultCompilerTypeInformation;
            }

            return(compilerTypeInformation);
        }
Example #2
0
        public CompilerTypeManager()
        {
            compilerTypeInformations       = new Dictionary <Type, CompilerTypeInformation>();
            defaultCompilerTypeInformation = new CompilerTypeInformation(null, null, "%s");

            addCompilerTypeInformation(typeof(int), new CompilerTypeInformation(Type.getInternalName(typeof(Integer)), "(I)V", "0x%X"));
            addCompilerTypeInformation(typeof(bool), new CompilerTypeInformation(Type.getInternalName(typeof(bool)), "(Z)V", "%b"));
            addCompilerTypeInformation(typeof(long), new CompilerTypeInformation(Type.getInternalName(typeof(Long)), "(J)V", "0x%X"));
            addCompilerTypeInformation(typeof(short), new CompilerTypeInformation(Type.getInternalName(typeof(Short)), "(S)V", "0x%X"));
            addCompilerTypeInformation(typeof(float), new CompilerTypeInformation(Type.getInternalName(typeof(Float)), "(F)V", "%f"));
            addCompilerTypeInformation(typeof(string), new CompilerTypeInformation(null, null, "'%s'"));
        }
Example #3
0
 private void addCompilerTypeInformation(Type type, CompilerTypeInformation compilerTypeInformation)
 {
     compilerTypeInformations[type] = compilerTypeInformation;
 }