Skip to content

Commit

Permalink
Pull doc-only methods from JavaStarlarkCommon to JavaCommonApi
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 579147810
Change-Id: I13a0face5beeee44470786b3255dc85494e132df
  • Loading branch information
hvadehra authored and copybara-github committed Nov 3, 2023
1 parent b749229 commit 304e5e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,24 +271,6 @@ public StarlarkValue getDefaultJavacOpts(Info javaToolchainUnchecked, boolean as
}
}

@Override
public ProviderApi getJavaToolchainProvider() {
// method exists solely for documentation
throw new UnsupportedOperationException();
}

@Override
public Provider getJavaRuntimeProvider() {
// method exists purely for documentation
throw new UnsupportedOperationException();
}

@Override
public ProviderApi getBootClassPathInfo() {
// method exists solely for documentation
throw new UnsupportedOperationException();
}

@Override
public String getTargetKind(Object target, StarlarkThread thread) throws EvalException {
checkPrivateAccess(thread);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,21 +617,30 @@ StarlarkValue getDefaultJavacOpts(Info javaToolchain, boolean asDepset)
"The key used to retrieve the provider that contains information about the Java "
+ "toolchain being used.",
structField = true)
ProviderApi getJavaToolchainProvider();
default ProviderApi getJavaToolchainProvider() {
// method exists purely for documentation
throw new UnsupportedOperationException();
}

@StarlarkMethod(
name = "JavaRuntimeInfo",
doc =
"The key used to retrieve the provider that contains information about the Java "
+ "runtime being used.",
structField = true)
ProviderApi getJavaRuntimeProvider();
default ProviderApi getJavaRuntimeProvider() {
// method exists purely for documentation
throw new UnsupportedOperationException();
}

@StarlarkMethod(
name = "BootClassPathInfo",
doc = "The provider used to supply bootclasspath information",
structField = true)
ProviderApi getBootClassPathInfo();
default ProviderApi getBootClassPathInfo() {
// method exists solely for documentation
throw new UnsupportedOperationException();
}

/** Returns target kind. */
@StarlarkMethod(
Expand Down

0 comments on commit 304e5e9

Please sign in to comment.