初始提交,未完全测试

This commit is contained in:
2026-02-27 14:37:10 +08:00
parent 76c0f469be
commit e270f02073
68 changed files with 5886 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env python3.9
# -*- coding: utf-8 -*-
"""
JFinal EncoderFactory - Encoder Factory
"""
class EncoderFactory:
"""Encoder factory for template output"""
encoding = "UTF-8"
def get_encoder(self):
"""Get encoder"""
from .JdkEncoder import JdkEncoder
return JdkEncoder()
@classmethod
def set_encoding(cls, encoding: str):
"""Set encoding"""
cls.encoding = encoding
@classmethod
def get_encoding(cls) -> str:
"""Get encoding"""
return cls.encoding
def __repr__(self) -> str:
return f"EncoderFactory(encoding={self.encoding})"