|
| 1 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 2 | +Name: test/YataganTabletComponent.java |
| 3 | +package test; |
| 4 | + |
| 5 | +import com.yandex.yatagan.AutoBuilder; |
| 6 | +import com.yandex.yatagan.Optional; |
| 7 | +import com.yandex.yatagan.internal.Checks; |
| 8 | +import com.yandex.yatagan.internal.YataganGenerated; |
| 9 | +import java.lang.Class; |
| 10 | +import java.lang.Override; |
| 11 | +import java.lang.SuppressWarnings; |
| 12 | +import java.util.Collections; |
| 13 | +import javax.annotation.processing.Generated; |
| 14 | + |
| 15 | +@SuppressWarnings({"unchecked", "rawtypes", "NullableProblems", "deprecation"}) |
| 16 | +@YataganGenerated |
| 17 | +@Generated("com.yandex.yatagan.codegen.impl.ComponentGenerator") |
| 18 | +public final class YataganTabletComponent implements TabletComponent { |
| 19 | + private YataganTabletComponent() { |
| 20 | + } |
| 21 | + |
| 22 | + @Override |
| 23 | + public CommonClass getCommonClass() { |
| 24 | + return new CommonClass(Optional.empty()); |
| 25 | + } |
| 26 | + |
| 27 | + public static AutoBuilder<YataganTabletComponent> autoBuilder() { |
| 28 | + return new AutoBuilderImpl(); |
| 29 | + } |
| 30 | + |
| 31 | + private static final class AutoBuilderImpl implements AutoBuilder<YataganTabletComponent> { |
| 32 | + @Override |
| 33 | + public final <I> AutoBuilder<YataganTabletComponent> provideInput(I input, |
| 34 | + Class<I> inputClass) { |
| 35 | + Checks.reportUnexpectedAutoBuilderInput(input.getClass(), Collections.emptyList()); |
| 36 | + return this; |
| 37 | + } |
| 38 | + |
| 39 | + @Override |
| 40 | + public final YataganTabletComponent create() { |
| 41 | + return new YataganTabletComponent(); |
| 42 | + } |
| 43 | + } |
| 44 | +} |
| 45 | + |
| 46 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 47 | +Name: test/YataganPhoneComponent.java |
| 48 | +package test; |
| 49 | + |
| 50 | +import com.yandex.yatagan.AutoBuilder; |
| 51 | +import com.yandex.yatagan.Optional; |
| 52 | +import com.yandex.yatagan.internal.Checks; |
| 53 | +import com.yandex.yatagan.internal.YataganGenerated; |
| 54 | +import java.lang.Class; |
| 55 | +import java.lang.Override; |
| 56 | +import java.lang.SuppressWarnings; |
| 57 | +import java.util.Collections; |
| 58 | +import javax.annotation.processing.Generated; |
| 59 | + |
| 60 | +@SuppressWarnings({"unchecked", "rawtypes", "NullableProblems", "deprecation"}) |
| 61 | +@YataganGenerated |
| 62 | +@Generated("com.yandex.yatagan.codegen.impl.ComponentGenerator") |
| 63 | +public final class YataganPhoneComponent implements PhoneComponent { |
| 64 | + private YataganPhoneComponent() { |
| 65 | + } |
| 66 | + |
| 67 | + @Override |
| 68 | + public CommonClass getCommonClass() { |
| 69 | + return new CommonClass(this.optOfPhoneAssistedFactory()); |
| 70 | + } |
| 71 | + |
| 72 | + Optional optOfPhoneAssistedFactory() { |
| 73 | + return Optional.of(this.new PhoneAssistedFactoryImpl()); |
| 74 | + } |
| 75 | + |
| 76 | + public static AutoBuilder<YataganPhoneComponent> autoBuilder() { |
| 77 | + return new AutoBuilderImpl(); |
| 78 | + } |
| 79 | + |
| 80 | + private final class PhoneAssistedFactoryImpl implements PhoneAssistedFactory { |
| 81 | + @Override |
| 82 | + public PhoneAssistedClass create(int i) { |
| 83 | + return new PhoneAssistedClass(new PhoneDependency(), i); |
| 84 | + } |
| 85 | + } |
| 86 | + |
| 87 | + private static final class AutoBuilderImpl implements AutoBuilder<YataganPhoneComponent> { |
| 88 | + @Override |
| 89 | + public final <I> AutoBuilder<YataganPhoneComponent> provideInput(I input, Class<I> inputClass) { |
| 90 | + Checks.reportUnexpectedAutoBuilderInput(input.getClass(), Collections.emptyList()); |
| 91 | + return this; |
| 92 | + } |
| 93 | + |
| 94 | + @Override |
| 95 | + public final YataganPhoneComponent create() { |
| 96 | + return new YataganPhoneComponent(); |
| 97 | + } |
| 98 | + } |
| 99 | +} |
| 100 | + |
| 101 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
0 commit comments