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.
30 lines
713 B
30 lines
713 B
4 years ago
|
/*
|
||
|
* 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.sections.Section;
|
||
|
|
||
|
public class RequiredPropsSection {
|
||
|
|
||
|
public MySection mMySection;
|
||
|
|
||
|
public Section buildWithAllOk() {
|
||
|
return mMySection.create().prop1(new Object()).prop2(new Object()).build();
|
||
|
}
|
||
|
|
||
|
// prop 2 is optional
|
||
|
public Section buildWithout2Ok() {
|
||
|
return mMySection.create().prop1(new Object()).build();
|
||
|
}
|
||
|
|
||
|
// prop 1 is required
|
||
|
public Section buildWithout1Bad() {
|
||
|
return mMySection.create().prop2(new Object()).build();
|
||
|
}
|
||
|
}
|