| 1 |
/* |
| 2 |
* Copyright (C) 2016 The Android Open Source Project |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 10 |
* Unless required by applicable law or agreed to in writing, software |
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
* See the License for the specific language governing permissions and |
| 14 |
* limitations under the License. |
| 15 |
*/ |
| 16 |
package android.databinding.tool.solver; |
| 17 |
|
| 18 |
import android.databinding.tool.expr.Expr; |
| 19 |
|
| 20 |
import org.jetbrains.annotations.NotNull; |
| 21 |
|
| 22 |
/** |
| 23 |
* Represents if statements in the execution. |
| 24 |
*/ |
| 25 |
public class ExecutionBranch { |
| 26 |
|
| 27 |
@NotNull |
| 28 |
private Expr mConditional; |
| 29 |
|
| 30 |
private final boolean mExpectedCondition; |
| 31 |
|
| 32 |
@NotNull |
| 33 |
private final ExecutionPath mPath; |
| 34 |
|
| 35 |
public ExecutionBranch(@NotNull ExecutionPath path, @NotNull Expr conditional, |
| 36 |
boolean expectedCondition) { |
| 37 |
mConditional = conditional; |
| 38 |
mExpectedCondition = expectedCondition; |
| 39 |
mPath = path; |
| 40 |
} |
| 41 |
|
| 42 |
@NotNull |
| 43 |
public Expr getConditional() { |
| 44 |
return mConditional; |
| 45 |
} |
| 46 |
|
| 47 |
public boolean getExpectedCondition() { |
| 48 |
return mExpectedCondition; |
| 49 |
} |
| 50 |
|
| 51 |
@NotNull |
| 52 |
public ExecutionPath getPath() { |
| 53 |
return mPath; |
| 54 |
} |
| 55 |
} |