| /* |
| * Copyright (C) 2016 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| package com.android.build.api.transform; |
| |
| import com.android.annotations.NonNull; |
| import com.android.annotations.Nullable; |
| import java.util.Collection; |
| |
| /** |
| * An invocation object used to pass of pertinent information for a |
| * {@link Transform#transform(TransformInvocation)} call. |
| */ |
| public interface TransformInvocation { |
| |
| /** |
| * Returns the context in which the transform is run. |
| * @return the context in which the transform is run. |
| */ |
| @NonNull |
| Context getContext(); |
| |
| /** |
| * Returns the inputs/outputs of the transform. |
| * @return the inputs/outputs of the transform. |
| */ |
| @NonNull |
| Collection<TransformInput> getInputs(); |
| |
| /** |
| * Returns the referenced-only inputs which are not consumed by this transformation. |
| * @return the referenced-only inputs. |
| */ |
| @NonNull Collection<TransformInput> getReferencedInputs(); |
| /** |
| * Returns the list of secondary file changes since last. Only secondary files that this |
| * transform can handle incrementally will be part of this change set. |
| * @return the list of changes impacting a {@link SecondaryInput} |
| */ |
| @NonNull Collection<SecondaryInput> getSecondaryInputs(); |
| |
| /** |
| * Returns the output provider allowing to create content. |
| * @return he output provider allowing to create content. |
| */ |
| @Nullable |
| TransformOutputProvider getOutputProvider(); |
| |
| |
| /** |
| * Indicates whether the transform execution is incremental. |
| * @return true for an incremental invocation, false otherwise. |
| */ |
| boolean isIncremental(); |
| } |