Clarify that PTransform#expand shouldn't be called

Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/73fbcba8
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/73fbcba8
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/73fbcba8

Branch: refs/heads/master
Commit: 73fbcba88fcc746695a0174d2e69bec4580c1d23
Parents: a03a638
Author: Ben Chambers <[email protected]>
Authored: Tue May 23 15:44:48 2017 -0700
Committer: Thomas Groh <[email protected]>
Committed: Thu May 25 13:00:46 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/beam/sdk/transforms/PTransform.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/73fbcba8/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/PTransform.java
----------------------------------------------------------------------
diff --git 
a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/PTransform.java 
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/PTransform.java
index d5df944..58051df 100644
--- 
a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/PTransform.java
+++ 
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/PTransform.java
@@ -176,8 +176,12 @@ import org.apache.beam.sdk.values.TupleTag;
 public abstract class PTransform<InputT extends PInput, OutputT extends 
POutput>
     implements Serializable /* See the note above */, HasDisplayData {
   /**
-   * Applies this {@code PTransform} on the given {@code InputT}, and returns 
its
-   * {@code Output}.
+   * Override this method to specify how this {@code PTransform} should be 
expanded
+   * on the given {@code InputT}.
+   *
+   * <p>NOTE: This method should not be called directly. Instead apply the
+   * {@code PTransform} should be applied to the {@code InputT} using the 
{@code apply}
+   * method.
    *
    * <p>Composite transforms, which are defined in terms of other transforms,
    * should return the output of one of the composed transforms.  Non-composite

Reply via email to