📄 rtsi.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_05) on Mon Mar 07 15:27:47 NZDT 2005 --><TITLE>RTSI</TITLE><META NAME="keywords" CONTENT="weka.core.RTSI class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="RTSI";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../weka/core/Range.html" title="class in weka.core"><B>PREV CLASS</B></A> <A HREF="../../weka/core/RTSI.StringCompare.html" title="class in weka.core"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="RTSI.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.core</FONT><BR>Class RTSI</H2><PRE>java.lang.Object <IMG SRC="../../resources/inherit.gif" ALT="extended by"><B>weka.core.RTSI</B></PRE><HR><DL><DT>public class <B>RTSI</B><DT>extends java.lang.Object</DL><P>This utility class is looking for all the classes implementing or inheriting from a given interface or class.<br> (RTSI = RunTime Subclass Identification) <p> <b>Notes</b><br> <ul> <li>Source: JavaWorld <a href="http://www.javaworld.com/javaworld/javatips/jw-javatip113.html" target="_blank">Tip 113</a>: Identify subclasses at runtime</li> <li>JWhich: JavaWorld <a href="http://www.javaworld.com/javaworld/javatips/jw-javatip105.html" target="_blank">Tip 105</a>: Mastering the classpath with JWhich</li> <li> Modifications by FracPete:<br> <ul> <li>it returns Vectors with the classnames (for the sorting see <code>StringCompare</code>)</li> <li>doesn't create an instance of class anymore, but rather tests, whether the superclass/interface is somewhere in the class hierarchy of the found class and whether it is abstract or not</li> <li>checks all parts of the classpath for the package and does not take the first one only (i.e. you can have a dir with the default classes and an additional dir with more classes that are not part of the default ones, e.g. developer classes)</li> </li> </ul><P><P><DL><DT><B>Version:</B></DT> <DD>$Revision: 1.2.2.4 $</DD><DT><B>Author:</B></DT> <DD><a href="mailto:daniel@satlive.org">Daniel Le Berre</a>, FracPete (fracpete at waikato dot ac dot nz)</DD><DT><B>See Also:</B><DD><A HREF="../../weka/core/RTSI.StringCompare.html" title="class in weka.core"><CODE>RTSI.StringCompare</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Nested Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> class</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/RTSI.StringCompare.html" title="class in weka.core">RTSI.StringCompare</A></B></CODE><BR> compares two strings with the following order:<br> case insensitive german umlauts (ä , ö etc.) or other non-ASCII letters are treated as special chars special chars < numbers < letters </TD></TR></TABLE> <!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/RTSI.html#VERBOSE">VERBOSE</A></B></CODE><BR> whether to output some debug information</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../weka/core/RTSI.html#RTSI()">RTSI</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/RTSI.html#find(java.lang.String)">find</A></B>(java.lang.String tosubclassname)</CODE><BR> Returns all the classes inheriting or implementing a given class in the currently loaded packages.<br> <b>Note:</b> If a package, containing subclasses, has not been loaded by the time of this method call, these classes won't be found! It's better to define the package name explicitly in which to look for subclasses, like in <code>find(String,String)</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/RTSI.html#find(java.lang.String, java.lang.Class)">find</A></B>(java.lang.String pckgname, java.lang.Class tosubclass)</CODE><BR> Return all the classes inheriting or implementing a given class in a given package.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/RTSI.html#find(java.lang.String, java.lang.String)">find</A></B>(java.lang.String pckname, java.lang.String tosubclassname)</CODE><BR> Returns all the classes inheriting or implementing a given class in a given package.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/RTSI.html#hasInterface(java.lang.Class, java.lang.Class)">hasInterface</A></B>(java.lang.Class intf, java.lang.Class cls)</CODE><BR> Checks whether the given class implements the given interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -