You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
835 B
39 lines
835 B
/*
|
|
* 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 codetoanalyze.java.litho;
|
|
|
|
import com.facebook.litho.Component;
|
|
import com.facebook.litho.annotations.TreeProp;
|
|
|
|
class MyTreeComponent extends Component {
|
|
@TreeProp Object prop1; // implicitly non-optional
|
|
|
|
Object nonProp;
|
|
|
|
public Builder create() {
|
|
return new Builder();
|
|
}
|
|
|
|
static class Builder extends Component.Builder<Builder> {
|
|
MyTreeComponent mMyTreeComponent;
|
|
|
|
public Builder prop1(Object o) {
|
|
this.mMyTreeComponent.prop1 = o;
|
|
return this;
|
|
}
|
|
|
|
public MyTreeComponent build() {
|
|
return mMyTreeComponent;
|
|
}
|
|
|
|
@Override
|
|
public Builder getThis() {
|
|
return this;
|
|
}
|
|
}
|
|
}
|