diff options
author | cparsons <cparsons@google.com> | 2018-05-22 14:00:22 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-22 14:01:24 -0700 |
commit | 28cc833b50d55051ac087a5362b8c14cb67893e8 (patch) | |
tree | 5dc6629d2b4d629723e90195a5c7d50ada252597 /src/main/java/com/google/devtools/build/lib/skylarkinterface | |
parent | 055d6c619ab572debddb3518616c75f64462c145 (diff) |
Migrate JavaInfo's provider to use the new provider pattern.
This dramatically improves documentation generation for JavaInfo and it makes it far more maintainable and extensible going forward.
RELNOTES: None.
PiperOrigin-RevId: 197619040
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skylarkinterface')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkConstructor.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkConstructor.java b/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkConstructor.java index b785038da1..c2d62bd3d6 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkConstructor.java +++ b/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkConstructor.java @@ -35,4 +35,12 @@ public @interface SkylarkConstructor { * The java class of the skylark type that this annotation's method is a constructor for. */ Class<?> objectType(); + + /** + * If non-empty, documents the way to invoke this function from the top level. + * + * <p>For example, if this constructs objects of type Foo, and this value is set to "Bar.Baz", + * then the documentation for the method signature will appear as "Foo Bar.Baz(...)". + */ + String receiverNameForDoc() default ""; } |