From 5b5c1a9d784c320f434ac48cd6174d63738d1d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EA=B1=B4=EC=B0=BD?= <92219795+this-is-spear@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:34:45 +0900 Subject: [PATCH] Add generating-complex-types page of generating-objects section for kor doc (#894) * chore(docs) : add english text to be compared * fix(docs) : translate korean * fix(docs) : correction of vocabulary * fix(docs) : modify to be the same as the previous document too --- .../generating-complex-types.md | 118 +++++++++++++++++- 1 file changed, 117 insertions(+), 1 deletion(-) diff --git a/docs/content/v1.0.x-kor/docs/generating-objects/generating-complex-types.md b/docs/content/v1.0.x-kor/docs/generating-objects/generating-complex-types.md index ecec039ad..9c8b5ad61 100644 --- a/docs/content/v1.0.x-kor/docs/generating-objects/generating-complex-types.md +++ b/docs/content/v1.0.x-kor/docs/generating-objects/generating-complex-types.md @@ -8,4 +8,120 @@ identifier: "generating-complex-types" weight: 32 --- -### 한국어 번역 필요 +Fixture Monkey는 직접 생성하기 어려운 복잡한 객체도 테스트 픽스처로 쉽게 생성할 수 있습니다. + +이 페이지는 생성할 수 있는 다양한 타입의 객체를 보여줍니다. + +## Java +### Generic Objects +```java +@Value +public static class GenericObject { + T foo; +} + +@Value +public static class GenericArrayObject { + GenericObject[] foo; +} + +@Value +public static class TwoGenericObject { + T foo; + U bar; +} + +@Value +public static class ThreeGenericObject { + T foo; + U bar; + V baz; +} +``` + +### Generic Interfaces +```java +public interface GenericInterface { +} + +@Value +public static class GenericInterfaceImpl implements GenericInterface { + T foo; +} + +public interface TwoGenericInterface { +} + +@Value +public static class TwoGenericImpl implements TwoGenericInterface { + T foo; + + U bar; +} +``` + +### SelfReference +```java +@Value +public class SelfReference { + String foo; + SelfReference bar; +} + +@Value +public class SelfReferenceList { + String foo; + List bar; +} +``` + +### Interface +```java +public interface Interface { + String foo(); + + Integer bar(); +} + +public interface InheritedInterface extends Interface { + String foo(); +} + +public interface InheritedInterfaceWithSameNameMethod extends Interface { + String foo(); +} + +public interface ContainerInterface { + List baz(); + + Map qux(); +} + +public interface InheritedTwoInterface extends Interface, ContainerInterface { +} +``` + +## Kotlin +### Generic Objects +```kotlin +class Generic(val foo: T) + +class GenericImpl(val foo: Generic) +``` + +### SelfReference +```kotlin +class SelfReference(val foo: String, val bar: SelfReference?) +``` + +### Sealed class, Value class +```kotlin +sealed class SealedClass + +object ObjectSealedClass : SealedClass() + +class SealedClassImpl(val foo: String) : SealedClass() + +@JvmInline +value class ValueClass(val foo: String) +```