Пример #1
0
        public ICodegenBlock AddMethod(Type returnType, Type generator)
        {
            string methodName = CodeGenerationIDGenerator.GenerateMethod();
            var    method     = new CodegenMethod(
                returnType, methodName, Collections.GetEmptyList <CodegenNamedParam>(), GetGeneratorDetail(generator));

            _methods.Add(method);
            return(method.Statements);
        }
Пример #2
0
        public ICodegenBlock AddMethod(Type returnType, Type paramType, string paramName, Type generator)
        {
            string methodName = CodeGenerationIDGenerator.GenerateMethod();
            var    method     = new CodegenMethod(
                returnType, methodName, Collections.SingletonList(new CodegenNamedParam(paramType, paramName)),
                GetGeneratorDetail(generator));

            _methods.Add(method);
            return(method.Statements);
        }
Пример #3
0
        public ICodegenMember MakeMember(Type clazz, Type optionalTypeParam, Object @object)
        {
            string memberName = CodeGenerationIDGenerator.GenerateMember();

            return(new CodegenMember(memberName, clazz, optionalTypeParam, @object));
        }