( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.10754093584require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.10874122576include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.10874122576get_header( $name = ???, $args = ??? ).../single.php:10
60.10874122792locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.10884122888load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.10884123432require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.10894130840wp_head( ).../header.php:18
100.10894130840do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.10894131056WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.10894131056WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.10914134472wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.10914134472do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.10914134688WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.10914134688WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.10924136576twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.10934138096wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.10934138096WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.10934138096WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.10934138096_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.10944144048wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.10944263584trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.10754093584require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.10874122576include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.10874122576get_header( $name = ???, $args = ??? ).../single.php:10
60.10874122792locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.10884122888load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.10884123432require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.10894130840wp_head( ).../header.php:18
100.10894130840do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.10894131056WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.10894131056WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.10914134472wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.10914134472do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.10914134688WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.10914134688WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.10924136576twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.13814264688wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.13814264688WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.13814264688WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.13814264688_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.13814265008wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.13824265232trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

通过反射调用对象的方法

这是个测试用的例子,通过反射调用对象的方法。
TestRef.java
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;

/**
* Created by IntelliJ IDEA.
* File: TestRef.java
* User: String
* Date: 2010-3-29 14:48:44
*/

public class TestRef {

public static void main(String args[]) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
Foo foo = new Foo(“这个一个Foo对象!”);
Class clazz = foo.getClass();
Method m1 = clazz.getDeclaredMethod(“outInfo”);
Method m2 = clazz.getDeclaredMethod(“setMsg”, String.class);
Method m3 = clazz.getDeclaredMethod(“getMsg”);
m1.invoke(foo);
m2.invoke(foo, “重新设置msg信息!”);
String msg = (String) m3.invoke(foo);
System.out.println(msg);
}
}

class Foo {
private String msg;

public Foo(String msg) {
this.msg = msg;
}

public void setMsg(String msg) {
this.msg = msg;
}

public String getMsg() {
return msg;
}

public void outInfo() {
System.out.println(“这是测试Java反射的测试类”);
}
}

控制台输出结果:
这是测试Java反射的测试类
重新设置msg信息!

Process finished with exit code 0

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.