Created
October 30, 2020 06:26
-
-
Save mlegy/ddd912f1a3ef8f7cbb20c5d750fc6a47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NonNull | |
public static ActivityMainBinding bind(@NonNull View rootView) { | |
// The body of this method is generated in a way you would not otherwise write. | |
// This is done to optimize the compiled bytecode for size and performance. | |
int id; | |
missingId: { | |
id = R.id.textView; | |
TextView textView = rootView.findViewById(id); | |
if (textView == null) { | |
break missingId; | |
} | |
return new ActivityMainBinding((ConstraintLayout) rootView, textView); | |
} | |
String missingId = rootView.getResources().getResourceName(id); | |
throw new NullPointerException("Missing required view with ID: ".concat(missingId)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment