/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package com.facebook.litho; import com.facebook.litho.annotations.Prop; public class MyLithoComponent extends Component { @Prop Object prop1; // implicitly non-optional @Prop(optional = false) Object prop2; // explicitly non-optional public Builder create() { return new Builder(); } public static class Builder extends Component.Builder { MyLithoComponent mMyLithoComponent; public Builder prop1(Object o) { this.mMyLithoComponent.prop1 = o; return this; } public Builder prop2(Object o) { this.mMyLithoComponent.prop2 = o; return this; } public MyLithoComponent build() { return mMyLithoComponent; } @Override public Builder getThis() { return this; } } }