tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [07/50] tinkerpop git commit: TINKERPOP-1562 Minor changes to javadocs.
Date Fri, 16 Dec 2016 15:55:08 GMT
TINKERPOP-1562 Minor changes to javadocs.

Also, moved a public static field back to ImportCustomizer (after it became a interface).


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/03e931d1
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/03e931d1
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/03e931d1

Branch: refs/heads/TINKERPOP-1490
Commit: 03e931d151684e2186ae9b8b1f7887b93817157f
Parents: a91fb80
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Wed Nov 23 11:31:06 2016 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Fri Dec 2 06:28:51 2016 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/jsr223/CoreGremlinPlugin.java |  7 ++++---
 .../gremlin/jsr223/DefaultImportCustomizer.java     |  8 --------
 .../tinkerpop/gremlin/jsr223/ImportCustomizer.java  | 10 ++++++++++
 .../gremlin/jsr223/ImportGremlinPlugin.java         |  7 ++++---
 .../gremlin/jsr223/ScriptFileGremlinPlugin.java     | 16 ++++++++++------
 5 files changed, 28 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/03e931d1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinPlugin.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinPlugin.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinPlugin.java
index 410b222..d579691 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinPlugin.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinPlugin.java
@@ -23,13 +23,14 @@ import org.apache.tinkerpop.gremlin.util.CoreImports;
 import java.util.Optional;
 
 /**
- * This module is required for a {@code ScriptEngine} to be Gremlin-enabled.
+ * This module is required for a {@code ScriptEngine} to be Gremlin-enabled. This {@link
GremlinPlugin} is not enabled
+ * for the {@code ServiceLoader}. It is designed to be instantiated manually.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public final class CoreGremlinPlugin implements GremlinPlugin {
 
-    private static final String MODULE_NAME = "tinkerpop.core";
+    private static final String NAME = "tinkerpop.core";
 
     private static final ImportCustomizer gremlinCore = DefaultImportCustomizer.build()
             .addClassImports(CoreImports.getClassImports())
@@ -57,6 +58,6 @@ public final class CoreGremlinPlugin implements GremlinPlugin {
 
     @Override
     public String getName() {
-        return MODULE_NAME;
+        return NAME;
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/03e931d1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultImportCustomizer.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultImportCustomizer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultImportCustomizer.java
index 85d6531..fa0965d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultImportCustomizer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultImportCustomizer.java
@@ -33,14 +33,6 @@ import java.util.Set;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public class DefaultImportCustomizer implements ImportCustomizer {
-    /**
-     * @deprecated As of release 3.2.4, not replaced.
-     */
-    @Deprecated
-    public static final ImportCustomizer GREMLIN_CORE = DefaultImportCustomizer.build()
-            .addClassImports(CoreImports.getClassImports())
-            .addEnumImports(CoreImports.getEnumImports())
-            .addMethodImports(CoreImports.getMethodImports()).create();
 
     private final Set<Class> classImports;
     private final Set<Method> methodImports;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/03e931d1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
index 7eced82..7b056ff 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
@@ -18,6 +18,8 @@
  */
 package org.apache.tinkerpop.gremlin.jsr223;
 
+import org.apache.tinkerpop.gremlin.util.CoreImports;
+
 import java.lang.reflect.Method;
 import java.util.Set;
 
@@ -27,6 +29,14 @@ import java.util.Set;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public interface ImportCustomizer extends Customizer {
+    /**
+     * @deprecated As of release 3.2.4, not replaced.
+     */
+    @Deprecated
+    public static final ImportCustomizer GREMLIN_CORE = DefaultImportCustomizer.build()
+            .addClassImports(CoreImports.getClassImports())
+            .addEnumImports(CoreImports.getEnumImports())
+            .addMethodImports(CoreImports.getMethodImports()).create();
 
     public Set<Class> getClassImports();
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/03e931d1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportGremlinPlugin.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportGremlinPlugin.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportGremlinPlugin.java
index 26290d3..0d446c0 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportGremlinPlugin.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportGremlinPlugin.java
@@ -33,15 +33,16 @@ import java.util.stream.Stream;
 /**
  * A module that allows custom class, static method and enum imports (i.e. those that are
statically defined by a
  * module within itself). A user might utilize this class to supply their own imports. This
module is not specific
- * to any {@link GremlinScriptEngine} - the imports are supplied to all engines.
+ * to any {@link GremlinScriptEngine} - the imports are supplied to all engines. This {@link
GremlinPlugin} is not
+ * enabled for the {@code ServiceLoader}. It is designed to be instantiated manually.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public final class ImportGremlinPlugin extends AbstractGremlinPlugin {
-    private static final String MODULE_NAME = "tinkerpop.import";
+    private static final String NAME = "tinkerpop.import";
 
     private ImportGremlinPlugin(final Builder builder) {
-        super(MODULE_NAME, builder.appliesTo, DefaultImportCustomizer.build()
+        super(NAME, builder.appliesTo, DefaultImportCustomizer.build()
                                                 .addClassImports(builder.classImports)
                                                 .addEnumImports(builder.enumImports)
                                                 .addMethodImports(builder.methodImports).create());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/03e931d1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
index 3fd811a..757001c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
@@ -25,13 +25,16 @@ import java.util.HashSet;
 import java.util.Set;
 
 /**
+ * Loads scripts from one or more files into the {@link GremlinScriptEngine} at startup.
This {@link GremlinPlugin} is
+ * not enabled for the {@code ServiceLoader}. It is designed to be instantiated manually.
+ *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public final class ScriptFileGremlinPlugin extends AbstractGremlinPlugin {
-    private static final String MODULE_NAME = "tinkerpop.script";
+    private static final String NAME = "tinkerpop.script";
 
-    public ScriptFileGremlinPlugin(final Builder builder) {
-        super(MODULE_NAME, builder.appliesTo, new DefaultScriptCustomizer(builder.files));
+    private ScriptFileGremlinPlugin(final Builder builder) {
+        super(NAME, builder.appliesTo, new DefaultScriptCustomizer(builder.files));
     }
 
     public static Builder build() {
@@ -47,10 +50,11 @@ public final class ScriptFileGremlinPlugin extends AbstractGremlinPlugin
{
 
         /**
          * The name of the {@link GremlinScriptEngine} that this module will apply to. Setting
no values here will
-         * make the module available to all the engines.
+         * make the module available to all the engines. Typically, this value should be
set as a script's syntax will
+         * be bound to the {@link GremlinScriptEngine} language.
          */
-        public Builder appliesTo(final Collection<String> scriptEngineName) {
-            this.appliesTo.addAll(scriptEngineName);
+        public Builder appliesTo(final Collection<String> scriptEngineNames) {
+            this.appliesTo.addAll(scriptEngineNames);
             return this;
         }
 


Mime
View raw message