db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1476915 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/compile/ impl/sql/ impl/sql/compile/
Date Mon, 29 Apr 2013 08:21:19 GMT
Author: kahatlen
Date: Mon Apr 29 08:21:18 2013
New Revision: 1476915

URL: http://svn.apache.org/r1476915
Log:
DERBY-6169: Reduce visibility of classes and methods under impl/sql

- Change visibility of all classes generated from sqlgrammar.jj to
  package protected.

- Make CompilerContextImpl.getParameterTypes() package protected since
  it's never called from outside the package.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharStream.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/Token.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java?rev=1476915&r1=1476914&r2=1476915&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java
Mon Apr 29 08:21:18 2013
@@ -38,8 +38,6 @@ import org.apache.derby.iapi.sql.depend.
 import org.apache.derby.iapi.sql.depend.Provider;
 import org.apache.derby.iapi.sql.depend.ProviderList;
 
-import org.apache.derby.iapi.types.DataTypeDescriptor;
-
 import org.apache.derby.iapi.store.access.StoreCostController;
 import org.apache.derby.iapi.store.access.SortCostController;
 
@@ -474,15 +472,6 @@ public interface CompilerContext extends
 	public boolean getReturnParameterFlag();
 
 	/**
-	 * Get the array of DataTypeDescriptor representing the types of
-	 * the ? parameters.
-	 *
-	 * @return	The parameter descriptors
-	 */
-
-	public DataTypeDescriptor[] getParameterTypes();
-
-	/**
 	 * Get the cursor info stored in the context.
 	 *
 	 * @return the cursor info

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml?rev=1476915&r1=1476914&r2=1476915&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml Mon Apr 29 08:21:18
2013
@@ -74,6 +74,16 @@
       </fileset>
     </delete>
 
+    <!-- Reduce the visibility of these files from public to package. -->
+    <replaceregexp match="^public (class|interface)" replace="\1" flags="m">
+      <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile">
+        <include name="SQLParser.java"/>
+        <include name="SQLParserConstants.java"/>
+        <include name="SQLParserTokenManager.java"/>
+        <include name="TokenMgrError.java"/>
+      </fileset>
+    </replaceregexp>
+
   </target>
 
   <target name="compile" depends="parser">

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharStream.java?rev=1476915&r1=1476914&r2=1476915&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharStream.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharStream.java Mon
Apr 29 08:21:18 2013
@@ -36,7 +36,7 @@ package org.apache.derby.impl.sql.compil
  * operation.
  */
 
-public interface CharStream {
+interface CharStream {
 
   /**
    * Returns the next character from the selected input.  The method

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java?rev=1476915&r1=1476914&r2=1476915&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
Mon Apr 29 08:21:18 2013
@@ -600,9 +600,9 @@ public class CompilerContextImpl extends
 	}
 
 	/**
-	 * @see CompilerContext#getParameterTypes
+     * Get an array of type descriptors for all the ? parameters.
 	 */
-	public DataTypeDescriptor[] getParameterTypes()
+    DataTypeDescriptor[] getParameterTypes()
 	{
 		return parameterDescriptors;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java?rev=1476915&r1=1476914&r2=1476915&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java
Mon Apr 29 08:21:18 2013
@@ -1048,7 +1048,7 @@ abstract class MethodCallNode extends Ja
 		in the compilercontext for future call statements*/
 		DataTypeDescriptor dts = DataTypeDescriptor.getSQLDataTypeDescriptor(typeName);
 		if (getCompilerContext().getReturnParameterFlag()) {
-			getCompilerContext().getParameterTypes()[0] = dts;
+            getParameterTypes()[0] = dts;
 		}
     }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java?rev=1476915&r1=1476914&r2=1476915&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java Mon
Apr 29 08:21:18 2013
@@ -610,7 +610,7 @@ public abstract class QueryTreeNode impl
 	public DataTypeDescriptor[] getParameterTypes()
 		throws StandardException
 	{
-		return getCompilerContext().getParameterTypes();
+        return ((CompilerContextImpl) getCompilerContext()).getParameterTypes();
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/Token.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/Token.java?rev=1476915&r1=1476914&r2=1476915&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/Token.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/Token.java Mon Apr 29
08:21:18 2013
@@ -25,7 +25,7 @@ package org.apache.derby.impl.sql.compil
  * Describes the input token stream.
  */
 
-public class Token {
+class Token {
 
   /**
    * An integer that describes the kind of this token.  This numbering

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=1476915&r1=1476914&r2=1476915&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Mon Apr
29 08:21:18 2013
@@ -448,7 +448,7 @@ public class SQLParser
 	 private void setUpAndLinkParameters()
 			throws StandardException
 	 {
-		CompilerContext cc = getCompilerContext();
+		CompilerContextImpl cc = (CompilerContextImpl) getCompilerContext();
 		cc.setParameterList(parameterList);
 		/* Link the untyped parameters to the array of parameter descriptors */
 		



Mime
View raw message