MethodType method_type=MethodType.methodType(method.getReturnType(),parameter_type_list);
MethodHandle method_handle;
- /* throws access exception due to public methods of private classes going down the public method branch
- if((method.getModifiers() & Modifier.STATIC) != 0){
- if((method.getModifiers() & Modifier.PRIVATE) != 0){
- // Private static method
- method_handle = private_lookup.findStatic(class_metadata, method.getName(), method_type);
- }else{
- // Public or protected static method
- method_handle = lookup.findStatic(class_metadata, method.getName(), method_type);
- }
- }else if((method.getModifiers() & Modifier.PRIVATE) != 0){
- // Private instance method
- method_handle = private_lookup.findSpecial(class_metadata, method.getName(), method_type, class_metadata);
- }else{
- // Public or protected instance method
- method_handle = lookup.findVirtual(class_metadata, method.getName(), method_type);
- }
- */
if((method.getModifiers() & Modifier.STATIC) != 0){
method_handle = private_lookup.findStatic(class_metadata, method.getName(), method_type);
}else{
add_entry(signature,method_handle);
}catch(IllegalAccessException|NoSuchMethodException e){
- System.err.println("Mosaic_Dispatcher::add_methods unexpectedly failed to register method: "+method.getName());
+ System.err.println
+ (
+ "Mosaic_Dispatcher::add_methods unexpectedly failed to register method: "
+ + method.getName() + " in class: " + class_metadata.getName()
+ );
e.printStackTrace();
}
}
--- /dev/null
+#!/usr/bin/env bash
+script_afp=$(realpath "${BASH_SOURCE[0]}")
+
+# Removes all files found in the build directories. It asks no questions as to
+# how or why the files got there. Be especially careful with the 'bash'
+# directory if you have authored scripts for release, add a `bash🖉`
+# directory instead of putting them in `bash`.
+
+# input guards
+ env_must_be="developer/tool🖉/env"
+ if [ "$ENV" != "$env_must_be" ]; then
+ echo "$(script_fp):: error: must be run in the $env_must_be environment"
+ exit 1
+ fi
+
+# remove files
+ set -x
+ cd "$REPO_HOME"/developer
+
+ # rm_na currently does not handle links correctly
+ rm -r scratchpad/*
+
+ rm_na jvm/*
+ rm_na bash/*
+ set +x
+
+echo "$(script_fn) done."
+
+++ /dev/null
-#!/usr/bin/env bash
-script_afp=$(realpath "${BASH_SOURCE[0]}")
-
-# Removes all files found in the build directories. It asks no questions as to
-# how or why the files got there. Be especially careful with the 'bash'
-# directory if you have authored scripts for release, add a `bash🖉`
-# directory instead of putting them in `bash`.
-
-# input guards
- env_must_be="developer/tool🖉/env"
- if [ "$ENV" != "$env_must_be" ]; then
- echo "$(script_fp):: error: must be run in the $env_must_be environment"
- exit 1
- fi
-
-# remove files
- set -x
- cd "$REPO_HOME"/developer
-
- # rm_na currently does not handle links correctly
- rm -r scratchpad/*
-
- rm_na jvm/*
- rm_na bash/*
- set +x
-
-echo "$(script_fn) done."
-
System.out.println("");
System.out.println("running test: publicMethod_1");
if(Boolean.TRUE.equals(test_publicMethod_1())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result = false;
System.out.println("");
System.out.println("running test: privateMethod_2");
if(Boolean.TRUE.equals(test_privateMethod_2())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result = false;
System.out.println("");
System.out.println("running test: nestedPublicMethod_3");
if(Boolean.TRUE.equals(test_nestedPublicMethod_3())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result = false;
System.out.println("");
System.out.println("running test: nestedPrivateMethod_4");
if(Boolean.TRUE.equals(test_nestedPrivateMethod_4())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result = false;
}
private static boolean logPass(){
- System.out.println("PASSED");
+ System.out.println("passed");
return true;
}
System.out.println("");
System.out.println("running test: publicStaticField");
if(Boolean.TRUE.equals(test_publicStaticField())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result=false;
System.out.println("");
System.out.println("running test: privateStaticField");
if(Boolean.TRUE.equals(test_privateStaticField())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result=false;
System.out.println("");
System.out.println("running test: publicInstanceField");
if(Boolean.TRUE.equals(test_publicInstanceField())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result=false;
System.out.println("");
System.out.println("running test: privateInstanceField");
if(Boolean.TRUE.equals(test_privateInstanceField())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result=false;
System.out.println("");
System.out.println("running test: writePublicStaticField");
if(Boolean.TRUE.equals(test_writePublicStaticField())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result=false;
System.out.println("");
System.out.println("running test: writePrivateStaticField");
if(Boolean.TRUE.equals(test_writePrivateStaticField())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result=false;
System.out.println("");
System.out.println("running test: writePublicInstanceField");
if(Boolean.TRUE.equals(test_writePublicInstanceField())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result=false;
System.out.println("");
System.out.println("running test: writePrivateInstanceField");
if(Boolean.TRUE.equals(test_writePrivateInstanceField())){
- System.out.println("PASSED");
+ System.out.println("passed");
}else{
System.out.println("FAILED");
result=false;
--- /dev/null
+#!/usr/bin/env bash
+script_afp=$(realpath "${BASH_SOURCE[0]}")
+
+# input guards
+ env_must_be="tester/tool🖉/env"
+ if [ "$ENV" != "$env_must_be" ]; then
+ echo "$(script_fp):: error: must be run in the $env_must_be environment"
+ exit 1
+ fi
+
+# remove files
+ set -x
+ cd "$REPO_HOME"/tester
+ rm_na log/log.txt
+ rm_na -r scratchpad/*
+ rm_na jvm/*
+ rm_na jdwp_server/*
+ set +x
+
+echo "$(script_fn) done."
+++ /dev/null
-#!/usr/bin/env bash
-script_afp=$(realpath "${BASH_SOURCE[0]}")
-
-# input guards
- env_must_be="tester/tool🖉/env"
- if [ "$ENV" != "$env_must_be" ]; then
- echo "$(script_fp):: error: must be run in the $env_must_be environment"
- exit 1
- fi
-
-# remove files
- set -x
- cd "$REPO_HOME"/tester
- rm_na log/log.txt
- rm_na -r scratchpad/*
- rm_na jvm/*
- rm_na jdwp_server/*
- set +x
-
-echo "$(script_fn) done."