java_data.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:silverchain 作者: tomokinakamaru 项目源码 文件源码
def __str__(self):
        c = ''
        c += 'public static final class State' + self._idx + '<T>'
        c += ' extends {}'.format(self._name) if self._extends else ''
        c += ' {\n\n'
        c += '    final Context$ context;\n\n'
        c += '    State' + self._idx + '(Context$ context) {\n'
        c += '        this.context = context;\n'
        c += '    }\n\n'

        if self._extends:
            c += '    Context$ context() {\n'
            c += '        return context;\n'
            c += '    }\n\n'

        for m in sorted(self._methods):
            c += indent(str(m), '    ') + '\n\n'

        c += '}'
        return c
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号