Automatic code cleanup.
PiperOrigin-RevId: 457052862
Change-Id: I58c1e6d5256b76e83254c56598c411effc6ff12a
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index 95927c7..478b191 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -608,6 +608,17 @@
}
/**
+ * Returns the output artifact of an {@link OutputFile} of this target.
+ *
+ * @see #createOutputArtifact()
+ */
+ public Artifact createOutputArtifact(OutputFile out) {
+ PathFragment packageRelativePath =
+ getPackageDirectory().getRelative(PathFragment.create(out.getName()));
+ return internalCreateOutputArtifact(packageRelativePath, out, out.getKind());
+ }
+
+ /**
* Returns an artifact beneath the root of either the "bin" or "genfiles" tree, whose path is
* based on the name of this target and the current configuration, with a script suffix
* appropriate for the current host platform. ({@code .cmd} for Windows, otherwise {@code .sh}).
@@ -628,17 +639,6 @@
}
/**
- * Returns the output artifact of an {@link OutputFile} of this target.
- *
- * @see #createOutputArtifact()
- */
- public Artifact createOutputArtifact(OutputFile out) {
- PathFragment packageRelativePath =
- getPackageDirectory().getRelative(PathFragment.create(out.getName()));
- return internalCreateOutputArtifact(packageRelativePath, out, out.getKind());
- }
-
- /**
* Implementation for {@link #createOutputArtifact()} and {@link
* #createOutputArtifact(OutputFile)}. This is private so that {@link
* #createOutputArtifact(OutputFile)} can have a more specific signature.
@@ -907,6 +907,17 @@
}
/**
+ * Returns the declared provider (native and Starlark) for the specified constructor under the
+ * specified attribute of this target in the BUILD file. May return null if there is no
+ * TransitiveInfoCollection under the specified attribute.
+ */
+ @Nullable
+ public <T extends Info> T getPrerequisite(String attributeName, BuiltinProvider<T> starlarkKey) {
+ TransitiveInfoCollection prerequisite = getPrerequisite(attributeName);
+ return prerequisite == null ? null : prerequisite.get(starlarkKey);
+ }
+
+ /**
* Returns the {@link ConfiguredTargetAndData} that feeds ino this target through the specified
* attribute. Returns null if the attribute is empty.
*/
@@ -1010,17 +1021,6 @@
String attributeName, BuiltinProvider<T> starlarkKey) {
return AnalysisUtils.getProviders(getPrerequisites(attributeName), starlarkKey);
}
-
- /**
- * Returns the declared provider (native and Starlark) for the specified constructor under the
- * specified attribute of this target in the BUILD file. May return null if there is no
- * TransitiveInfoCollection under the specified attribute.
- */
- @Nullable
- public <T extends Info> T getPrerequisite(String attributeName, BuiltinProvider<T> starlarkKey) {
- TransitiveInfoCollection prerequisite = getPrerequisite(attributeName);
- return prerequisite == null ? null : prerequisite.get(starlarkKey);
- }
/**
* Returns all the providers of the specified type that are listed under the specified attribute
* of this target in the BUILD file, and that contain the specified provider.