扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
在本页阅读全文(共3页)
publicclass MyMethodInfo implements Comparable<MyMethodInfo> {
public Method method;
public MyMethodInfo(Method method) {
this.method = method;
}
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append( method.getName() ).append( " (" );
Class[] params = method.getParameterTypes();
for( int i = 0 ; i < params.length; i++ ) {
builder.append( params[i].getSimpleName() );
if( i < params.length - 1 ) {
builder.append( ", " );
}
}
builder.append( ')' );
return builder.toString();
}
publicint compareTo(MyMethodInfo o) {
returnthis.method.getName().compareTo( o.method.getName() );
}
} |
publicclass MethodArgPanel extends JPanel {
privatestaticfinallongserialVersionUID = 1L;
private JScrollPane jScrollPane = null;
private JTextArea argTextArea = null;
/**
*Thisisthedefaultconstructor
*/
public MethodArgPanel() {
super();
initialize();
}
/**
*Thismethodinitializesthis
*
*@returnvoid
*/
privatevoid initialize() {
this.setSize(246, 230);
this.setLayout(new BorderLayout());
this.add(getJScrollPane(), BorderLayout.CENTER);
}
/**
*ThismethodinitializesjScrollPane
*
*@returnjavax.swing.JScrollPane
*/
private JScrollPane getJScrollPane() {
if ( jScrollPane == null ) {
jScrollPane = new JScrollPane();
jScrollPane.setViewportView(getArgTextArea());
}
returnjScrollPane;
}
/**
*ThismethodinitializesargTextArea
*
*@returnjavax.swing.JTextArea
*/
private JTextArea getArgTextArea() {
if ( argTextArea == null ) {
argTextArea = new JTextArea();
}
returnargTextArea;
}
public String getText() {
returnargTextArea.getText();
}
} // @jve:decl-index=0:visual-constraint="10,10"
|
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者