From b70dc28ce967fb8b3b83e4e526f2f4ba0795644e Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Thu, 21 Sep 2023 21:42:16 +0200 Subject: [PATCH] java doc fixes --- .../ortus/boxlang/runtime/BoxRuntime.java | 2 +- .../runtime/context/BaseBoxContext.java | 9 ++-- .../runtime/context/CatchBoxContext.java | 15 +++++-- .../boxlang/runtime/context/IBoxContext.java | 2 +- .../runtime/context/ScriptingBoxContext.java | 3 +- .../boxlang/runtime/dynamic/Referencer.java | 2 +- .../boxlang/runtime/loader/ClassLocator.java | 3 -- .../ortus/boxlang/runtime/testing/Phase1.java | 36 +++++++-------- .../boxlang/runtime/testing/Phase1Switch.java | 44 +++++++++---------- .../runtime/testing/Phase1TryCatch.java | 40 ++++++++--------- .../testing/Phase2Closure$closure1.java | 16 +++---- .../runtime/testing/Phase2Closure.java | 38 ++++++++-------- .../runtime/testing/Phase2Lambda$lambda1.java | 10 ++--- .../boxlang/runtime/testing/Phase2Lambda.java | 30 ++++++------- .../runtime/testing/Phase2UDF$greet.java | 24 +++++----- .../boxlang/runtime/testing/Phase2UDF.java | 44 +++++++++---------- .../exceptions/ApplicationException.java | 24 +++++----- 17 files changed, 172 insertions(+), 170 deletions(-) diff --git a/runtime/src/main/java/ortus/boxlang/runtime/BoxRuntime.java b/runtime/src/main/java/ortus/boxlang/runtime/BoxRuntime.java index 9f50c8d70..ccc51ae35 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/BoxRuntime.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/BoxRuntime.java @@ -244,7 +244,7 @@ public void executeTemplate( URL templateURL ) throws Throwable { /** * Execute a single template in its own context using a {@see URL} of the template to execution * - * @param templateURL A URL location to execution + * @param template A template to execute * * @throws Throwable if the template cannot be executed */ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/context/BaseBoxContext.java b/runtime/src/main/java/ortus/boxlang/runtime/context/BaseBoxContext.java index fa7116504..05a7ea0d9 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/context/BaseBoxContext.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/context/BaseBoxContext.java @@ -54,17 +54,14 @@ public class BaseBoxContext implements IBoxContext { /** * Creates a new execution context with a bounded execution template and parent context * - * @param template The template that this execution context is bound to - * @param parent The parent context + * @param parent The parent context */ public BaseBoxContext( IBoxContext parent ) { this.parent = parent; } /** - * Creates a new execution context with a bounded execution template - * - * @param templatePath The template that this execution context is bound to + * Creates a new execution context with no execution template */ public BaseBoxContext() { this( null ); @@ -79,7 +76,7 @@ public BaseBoxContext() { /** * Push a template to the stack * - * @param templatePath The template that this execution context is bound to + * @param template The template that this execution context is bound to * * @return IBoxContext */ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/context/CatchBoxContext.java b/runtime/src/main/java/ortus/boxlang/runtime/context/CatchBoxContext.java index 9e93aa6ea..e310e4f5e 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/context/CatchBoxContext.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/context/CatchBoxContext.java @@ -46,8 +46,9 @@ public class CatchBoxContext extends BaseBoxContext { /** * Creates a new execution context with a bounded execution template and parent context * - * @param templatePath The template that this execution context is bound to * @param parent The parent context + * @param exceptionKey The key to use for the exception + * @param exception The exception to store */ public CatchBoxContext( IBoxContext parent, Key exceptionKey, Throwable exception ) { super( parent ); @@ -71,7 +72,9 @@ public CatchBoxContext( IBoxContext parent, Key exceptionKey, Throwable exceptio * Meaning it needs to search scopes in order according to it's context. * A nearby lookup is used for the closest context to the executing code * - * @param key The key to search for + * @param key The key to search for + * @param defaultScope The default scope to use if the key is not found + * @param shallow true, do not delegate to parent or default scope if not found * * @return The value of the key if found * @@ -100,7 +103,8 @@ public ScopeSearchResult scopeFindNearby( Key key, IScope defaultScope, boolean * Unlike scopeFindNearby(), this version only searches trancedent scopes like * cgi or server which are never encapsulated like variables is inside a CFC. * - * @param key The key to search for + * @param key The key to search for + * @param defaultScope The default scope to use if the key is not found * * @return The value of the key if found * @@ -127,6 +131,8 @@ public ScopeSearchResult scopeFind( Key key, IScope defaultScope ) { * Get a scope from the context. If not found, the parent context is asked. * Don't search for scopes which are nearby to an execution context * + * @param name The name of the scope to get + * * @return The requested scope */ public IScope getScope( Key name ) throws ScopeNotFoundException { @@ -146,6 +152,9 @@ public IScope getScope( Key name ) throws ScopeNotFoundException { * Get a scope from the context. If not found, the parent context is asked. * Search all konwn scopes * + * @param name The name of the scope to get + * @param shallow true, do not delegate to parent or default scope if not found + * * @return The requested scope */ public IScope getScopeNearby( Key name, boolean shallow ) throws ScopeNotFoundException { diff --git a/runtime/src/main/java/ortus/boxlang/runtime/context/IBoxContext.java b/runtime/src/main/java/ortus/boxlang/runtime/context/IBoxContext.java index 6f47460e7..5b0302a5e 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/context/IBoxContext.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/context/IBoxContext.java @@ -190,7 +190,7 @@ public interface IBoxContext { /** * Push a template to the stack * - * @param templatePath The template that this execution context is bound to + * @param template The template that this execution context is bound to * * @return IBoxContext */ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/context/ScriptingBoxContext.java b/runtime/src/main/java/ortus/boxlang/runtime/context/ScriptingBoxContext.java index f21d65397..4317d6741 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/context/ScriptingBoxContext.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/context/ScriptingBoxContext.java @@ -52,8 +52,7 @@ public class ScriptingBoxContext extends BaseBoxContext { /** * Creates a new execution context with a bounded execution template and parent context * - * @param template The template that this execution context is bound to - * @param parent The parent context + * @param parent The parent context */ public ScriptingBoxContext( IBoxContext parent ) { super( parent ); diff --git a/runtime/src/main/java/ortus/boxlang/runtime/dynamic/Referencer.java b/runtime/src/main/java/ortus/boxlang/runtime/dynamic/Referencer.java index ffc7b4ed6..0860c5c47 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/dynamic/Referencer.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/dynamic/Referencer.java @@ -117,7 +117,7 @@ public static Object set( Object object, Key key, Object value ) { * * @param object The object to dereference * @param value The value to assign - * @param key The key to dereference + * @param keys The keys to dereference * * @return The value that was assigned */ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/loader/ClassLocator.java b/runtime/src/main/java/ortus/boxlang/runtime/loader/ClassLocator.java index f956f297a..2583fef92 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/loader/ClassLocator.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/loader/ClassLocator.java @@ -486,7 +486,6 @@ public Optional safeLoad( IBoxContext context, String name, List< * @param context The current context of execution * @param name The fully qualified path/name of the class to load * @param resolverPrefix The prefix of the resolver to use - * @param imports The list of imports to use when resolving the class * * @return The invokable representation of the class * @@ -505,8 +504,6 @@ public Optional safeLoad( IBoxContext context, String name, Strin * @param imports The list of imports to use when resolving the class * * @return The invokable representation of the class - * - * @throws ClassNotFoundException If the class was not found in the resolver */ public Optional safeLoad( IBoxContext context, String name, String resolverPrefix, List imports ) { diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1.java index 0b50a1a13..c8c62a929 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1.java @@ -47,25 +47,25 @@ public static synchronized Phase1 getInstance() { return instance; } - /** + /* *
-	
-	  // Static reference to System (java proxy?)
-	  variables['system'] = create java:java.lang.System;
-	  // call constructor to create instance
-	  variables.greeting = new java:java.lang.String( 'Hello' );
-	
-	
-	  // Conditional, requires operation support
-	  if( variables.greeting == 'Hello' ) {
-	    // De-referencing "out" and "println" and calling Java method via invoke dynamic
-	    variables.system.out.println(
-	      // Multi-line statement, expression requires concat operator and possible casting
-	      // Unscoped lookup requires scope search
-	      greeting & " world"
-	    )
-	  }
-	
+	 * 
+	 * // Static reference to System (java proxy?)
+	 * variables['system'] = create java:java.lang.System;
+	 * // call constructor to create instance
+	 * variables.greeting = new java:java.lang.String( 'Hello' );
+	 * 
+	 * 
+	 * // Conditional, requires operation support
+	 * if( variables.greeting == 'Hello' ) {
+	 * // De-referencing "out" and "println" and calling Java method via invoke dynamic
+	 * variables.system.out.println(
+	 * // Multi-line statement, expression requires concat operator and possible casting
+	 * // Unscoped lookup requires scope search
+	 * greeting & " world"
+	 * )
+	 * }
+	 * 
 	 * 
*/ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1Switch.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1Switch.java index 4d629b820..f42aa719b 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1Switch.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1Switch.java @@ -47,29 +47,29 @@ public static synchronized Phase1Switch getInstance() { return instance; } - /** + /* *
-	
-		variables.foo = "bar";
-		variables.systemOut = (create java:java.lang.System).out;
-	
-		switch( "12" ) {
-		case "brad":
-			variables.systemOut.println("case 1");
-			break;
-		case 42: {
-			variables.systemOut.println("case 2");
-			break;
-		}
-		case 5+7:
-			variables.systemOut.println("case 3");
-		case variables.foo:
-			variables.systemOut.println("case 4");
-			break;
-		default:
-			variables.systemOut.println("default case");
-		}
-	
+	 * 
+	 * variables.foo = "bar";
+	 * variables.systemOut = (create java:java.lang.System).out;
+	 *
+	 * switch( "12" ) {
+	 * case "brad":
+	 * variables.systemOut.println("case 1");
+	 * break;
+	 * case 42: {
+	 * variables.systemOut.println("case 2");
+	 * break;
+	 * }
+	 * case 5+7:
+	 * variables.systemOut.println("case 3");
+	 * case variables.foo:
+	 * variables.systemOut.println("case 4");
+	 * break;
+	 * default:
+	 * variables.systemOut.println("default case");
+	 * }
+	 * 
 	 * 
*/ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1TryCatch.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1TryCatch.java index 20904bb72..578c1a6e7 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1TryCatch.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase1TryCatch.java @@ -49,27 +49,27 @@ public static synchronized Phase1TryCatch getInstance() { return instance; } - /** + /* *
-	
-	  system = create java:java.lang.System;
-	
-	  try {
-		1/0
-	  } catch (any e) {
-	    variables.system.out.println(e.message);
-	  } finally {
-	    variables.system.out.println("Finally");
-	  }
-	
-	  try {
-		throw new java:ortus.boxlang.runtime.types.exceptions.BoxLangException( "My Message", "My detail", "com.foo.type" );
-	  } catch ("com.foo.type" e) {
-	   variables.system.out.println(e.message);
-	  } catch (java.lang.RuntimeException e) {
-	   variables.system.out.println(e.message);
-	  }
-	
+	 * 
+	 * system = create java:java.lang.System;
+	 * 
+	 * try {
+	 * 1/0
+	 * } catch (any e) {
+	 * variables.system.out.println(e.message);
+	 * } finally {
+	 * variables.system.out.println("Finally");
+	 * }
+	 * 
+	 * try {
+	 * throw new java:ortus.boxlang.runtime.types.exceptions.BoxLangException( "My Message", "My detail", "com.foo.type" );
+	 * } catch ("com.foo.type" e) {
+	 * variables.system.out.println(e.message);
+	 * } catch (java.lang.RuntimeException e) {
+	 * variables.system.out.println(e.message);
+	 * }
+	 * 
 	 * 
*/ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Closure$closure1.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Closure$closure1.java index d750f73af..d6cd140d0 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Closure$closure1.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Closure$closure1.java @@ -97,15 +97,15 @@ public Map getMetadata() { super( declaringContext ); } - /** + /* *
-	    ( required string name='Brad' ) => {
-	        var greeting = "Hello " & name;
-	
-	        out.println( "Inside Closure, outside lookup finds: " & outside )
-	
-	        return greeting;
-	    }
+	 * ( required string name='Brad' ) => {
+	 * var greeting = "Hello " & name;
+	 * 
+	 * out.println( "Inside Closure, outside lookup finds: " & outside )
+	 * 
+	 * return greeting;
+	 * }
 	 * 
*/ @Override diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Closure.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Closure.java index 05fee4370..9eb2a28f4 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Closure.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Closure.java @@ -50,26 +50,26 @@ public static synchronized Phase2Closure getInstance() { return instance; } - /** + /* *
-	
-	    variables.outside = "Outside scope value";
-	    variables.greet = ( required string name='Brad' ) => {
-	        var greeting = "Hello " & name;
-	
-	        out.println( "Inside Closure, outside lookup finds: " & outside )
-	
-	        return greeting;
-	    }
-	
-	    variables.out = (create java.lang.System).out;
-	
-	    // Positional args
-	    variables.out.println( greet( 'John' ) );
-	
-	    // named args
-	    variables.out.println( greet( name='John' ) );
-	
+	 * 
+	 * variables.outside = "Outside scope value";
+	 * variables.greet = ( required string name='Brad' ) => {
+	 * var greeting = "Hello " & name;
+	 * 
+	 * out.println( "Inside Closure, outside lookup finds: " & outside )
+	 * 
+	 * return greeting;
+	 * }
+	 * 
+	 * variables.out = (create java.lang.System).out;
+	 * 
+	 * // Positional args
+	 * variables.out.println( greet( 'John' ) );
+	 * 
+	 * // named args
+	 * variables.out.println( greet( name='John' ) );
+	 * 
 	 * 
*/ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Lambda$lambda1.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Lambda$lambda1.java index aed739633..5ef7d7747 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Lambda$lambda1.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Lambda$lambda1.java @@ -103,12 +103,12 @@ public Map getMetadata() { return instance; } - /** + /* *
-	    ( required string name='Brad' ) -> {
-	        var greeting = "Hello " & name;
-	        return greeting;
-	    }
+	 * ( required string name='Brad' ) -> {
+	 * var greeting = "Hello " & name;
+	 * return greeting;
+	 * }
 	 * 
*/ @Override diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Lambda.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Lambda.java index 9d7be6840..286c2e1ec 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Lambda.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2Lambda.java @@ -50,22 +50,22 @@ public static synchronized Phase2Lambda getInstance() { return instance; } - /** + /* *
-	
-	    variables.greet = ( required string name='Brad' ) -> {
-	        var greeting = "Hello " & name;
-	        return greeting;
-	    }
-	
-	    variables.out = (create java.lang.System).out;
-	
-	    // Positional args
-	    variables.out.println( greet( 'John' ) );
-	
-	    // named args
-	    variables.out.println( greet( name='John' ) );
-	
+	 * 
+	 * variables.greet = ( required string name='Brad' ) -> {
+	 * var greeting = "Hello " & name;
+	 * return greeting;
+	 * }
+	 * 
+	 * variables.out = (create java.lang.System).out;
+	 * 
+	 * // Positional args
+	 * variables.out.println( greet( 'John' ) );
+	 * 
+	 * // named args
+	 * variables.out.println( greet( name='John' ) );
+	 * 
 	 * 
*/ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2UDF$greet.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2UDF$greet.java index ed2c1891b..3e60b759f 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2UDF$greet.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2UDF$greet.java @@ -115,19 +115,19 @@ public Access getAccess() { return instance; } - /** + /* *
-	    string function greet( required string name='Brad' ) hint="My Function Hint" {
-	        local.race = "Local scope value";
-	        arguments.race = "Arguments scope value";
-	
-	        var greeting = "Hello " & name;
-	
-	        // Reach "into" parent context and get "out" from variables scope
-	        out.println( "Inside UDF, race scope lookup finds: " & race )
-	
-	        return greeting;
-	    }
+	 * string function greet( required string name='Brad' ) hint="My Function Hint" {
+	 * local.race = "Local scope value";
+	 * arguments.race = "Arguments scope value";
+	 * 
+	 * var greeting = "Hello " & name;
+	 * 
+	 * // Reach "into" parent context and get "out" from variables scope
+	 * out.println( "Inside UDF, race scope lookup finds: " & race )
+	 * 
+	 * return greeting;
+	 * }
 	 * 
*/ @Override diff --git a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2UDF.java b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2UDF.java index 2f25fe4cf..eb199ce42 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2UDF.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/testing/Phase2UDF.java @@ -50,29 +50,29 @@ public static synchronized Phase2UDF getInstance() { return instance; } - /** + /* *
-	
-	    string function greet( required string name='Brad' ) hint="My Function Hint" {
-	        local.race = "Local scope value";
-	        arguments.race = "Arguments scope value";
-	
-	        var greeting = "Hello " & name;
-	
-	        // Reach "into" parent context and get "out" from variables scope
-	        out.println( "Inside UDF, race scope lookup finds: " & race )
-	
-	        return greeting;
-	    }
-	
-	    variables.out = (create java.lang.System).out;
-	
-	    // Positional args
-	    variables.out.println( greet( 'John' ) );
-	
-	    // named args
-	    variables.out.println( greet( name='John' ) );
-	
+	 * 
+	 * string function greet( required string name='Brad' ) hint="My Function Hint" {
+	 * local.race = "Local scope value";
+	 * arguments.race = "Arguments scope value";
+	 * 
+	 * var greeting = "Hello " & name;
+	 * 
+	 * // Reach "into" parent context and get "out" from variables scope
+	 * out.println( "Inside UDF, race scope lookup finds: " & race )
+	 * 
+	 * return greeting;
+	 * }
+	 * 
+	 * variables.out = (create java.lang.System).out;
+	 * 
+	 * // Positional args
+	 * variables.out.println( greet( 'John' ) );
+	 * 
+	 * // named args
+	 * variables.out.println( greet( name='John' ) );
+	 * 
 	 * 
*/ diff --git a/runtime/src/main/java/ortus/boxlang/runtime/types/exceptions/ApplicationException.java b/runtime/src/main/java/ortus/boxlang/runtime/types/exceptions/ApplicationException.java index d1acf1843..2e2c27072 100644 --- a/runtime/src/main/java/ortus/boxlang/runtime/types/exceptions/ApplicationException.java +++ b/runtime/src/main/java/ortus/boxlang/runtime/types/exceptions/ApplicationException.java @@ -43,8 +43,8 @@ public ApplicationException( String message ) { /** * Constructor * - * @param message The message - * @param errorCode The errorCode + * @param message The message + * @param cause The cause */ public ApplicationException( String message, Throwable cause ) { this( message, null, null, cause ); @@ -53,8 +53,8 @@ public ApplicationException( String message, Throwable cause ) { /** * Constructor * - * @param message The message - * @param errorCode The errorCode + * @param message The message + * @param extendedInfo The extendedInfo */ public ApplicationException( String message, String extendedInfo ) { this( message, null, extendedInfo, null ); @@ -63,10 +63,10 @@ public ApplicationException( String message, String extendedInfo ) { /** * Constructor * - * @param message The message - * @param detail The detail - * @param errorCode The errorCode - * @param cause The cause + * @param message The message + * @param detail The detail + * @param extendedInfo The extendedInfo + * @param cause The cause */ public ApplicationException( String message, String detail, String extendedInfo, Throwable cause ) { this( message, detail, "application", extendedInfo, cause ); @@ -75,10 +75,10 @@ public ApplicationException( String message, String detail, String extendedInfo, /** * Constructor * - * @param message The message - * @param detail The detail - * @param errorCode The errorCode - * @param cause The cause + * @param message The message + * @param detail The detail + * @param extendedInfo The extendedInfo + * @param cause The cause */ public ApplicationException( String message, String detail, String type, String extendedInfo, Throwable cause ) { super( message, detail, type, cause );