📄 javap.bsh
字号:
/** Print the public fields and methods of the specified class (output similar to the JDK javap command). <p> If the argument is a string it is considered to be a class name. If the argument is an object, the class of the object is used. If the arg is a class, the class is used. @method void javap( String | Object | Class )*/bsh.help.javap= "usage: javap( value )";import bsh.Name;javap( Object o ) { import java.lang.reflect.Modifier; if ( o instanceof Name.ClassIdentifier ) clas = this.namespace.identifierToClass(o); if ( o instanceof String) clas = this.namespace.getClass((String)o); else if ( o instanceof Class ) clas = o; else clas = o.getClass(); print( "Class "+clas+" extends " +clas.getSuperclass() ); methods=clas.getDeclaredMethods(); //print("------------- Methods ----------------"); for(int i=0; i<methods.length; i++) { m = methods[i]; if ( Modifier.isPublic( m.getModifiers() ) ) print( m ); } //print("------------- Fields ----------------"); fields=clas.getDeclaredFields(); for(int i=0; i<fields.length; i++) { f = fields[i]; if ( Modifier.isPublic( f.getModifiers() ) ) print( f ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -