📄 messagetoolimpl.html
字号:
public <B>MessageToolImpl</B>(java.lang.String fileName) throws java.io.IOException</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="initProps()"><!-- --></A><H3>initProps</H3><PRE>public void <B>initProps</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="process(java.io.InputStream, boolean)"><!-- --></A><H3>process</H3><PRE>public void <B>process</B>(java.io.InputStream is, boolean needRefresh) throws java.io.IOException</PRE><DL><DD>override the method process() in super class. when processing, generate class units.<DD><DL><DT><B>Overrides:</B><DD><A HREF="../../../../../com/sun/tdc/toolkit/verifier/VerifierImpl.html#process(java.io.InputStream, boolean)">process</A> in class <A HREF="../../../../../com/sun/tdc/toolkit/verifier/VerifierImpl.html">VerifierImpl</A></DL></DD></DL><HR><A NAME="cleanAllConcernedUnits()"><!-- --></A><H3>cleanAllConcernedUnits</H3><PRE>public void <B>cleanAllConcernedUnits</B>()</PRE><DL><DD>Clean all concerned Units<DD><DL><DT><B>Overrides:</B><DD>cleanAllConcernedUnits in class com.sun.tdc.toolkit.javafile.JavaDocument</DL></DD></DL><HR><A NAME="addMessageToolResource(java.lang.String, java.lang.String, java.lang.String, int)"><!-- --></A><H3>addMessageToolResource</H3><PRE>public <A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> <B>addMessageToolResource</B>(java.lang.String className, java.lang.String bundleName, java.lang.String bundleVarName, int type)</PRE><DL><DD>add a resource bundle definition statement in a class.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#addMessageToolResource(java.lang.String, java.lang.String, java.lang.String, int)">addMessageToolResource</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>className</CODE> - the class name in which the definition statement nests.<DD><CODE>bundleName</CODE> - the resource bundle name<DD><CODE>bundleVarName</CODE> - the resource bundle variable name<DD><CODE>type</CODE> - the resource bundle type</DL></DD></DL><HR><A NAME="addMessageToolResource(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, int, java.lang.String)"><!-- --></A><H3>addMessageToolResource</H3><PRE>public <A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> <B>addMessageToolResource</B>(java.lang.String className, java.lang.String bundleName, java.lang.String bundleVarName, int type, java.lang.String bundleClassName, int extractMethodType, java.lang.String localeStr)</PRE><DL><DD>add a resource bundle definition statement in a class.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#addMessageToolResource(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, int, java.lang.String)">addMessageToolResource</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>className</CODE> - the class name in which the definition statement nests<DD><CODE>bundleName</CODE> - the resource bundle name<DD><CODE>bundleVarName</CODE> - the resource bundle variable name<DD><CODE>type</CODE> - the resource bundle type<DD><CODE>bundleClassName</CODE> - the class name of the resource bundle which may be user defined<DD><CODE>extractMethodType</CODE> - the type of extracting string method(getString(key), getString(key, defaultVal), getString(key, locale), or getString(key, defaultVal, locale))<DD><CODE>localeStr</CODE> - the locale variable string</DL></DD></DL><HR><A NAME="updateMessageToolResource(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)"><!-- --></A><H3>updateMessageToolResource</H3><PRE>public <A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> <B>updateMessageToolResource</B>(java.lang.String className, java.lang.String oldBundleVarName, java.lang.String bundleName, java.lang.String bundleVarName, int type)</PRE><DL><DD>update a resource bundle definition statement in a class.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#updateMessageToolResource(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)">updateMessageToolResource</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>className</CODE> - the class name in which the definition statement nests.<DD><CODE>oldBundleVarName</CODE> - the old bundle variable name<DD><CODE>bundleName</CODE> - the resource bundle name<DD><CODE>bundleVarName</CODE> - the resource bundle variable name<DD><CODE>type</CODE> - the resource bundle type</DL></DD></DL><HR><A NAME="updateMessageToolResource(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, int, java.lang.String)"><!-- --></A><H3>updateMessageToolResource</H3><PRE>public <A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> <B>updateMessageToolResource</B>(java.lang.String className, java.lang.String oldBundleVarName, java.lang.String bundleName, java.lang.String bundleVarName, int type, java.lang.String bundleClassName, int extractMethodType, java.lang.String localeStr)</PRE><DL><DD>update a resource bundle definition statement in a class.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#updateMessageToolResource(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, int, java.lang.String)">updateMessageToolResource</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>className</CODE> - the class name in which the definition statement nests<DD><CODE>oldBundleVarName</CODE> - the old bundle variable name<DD><CODE>bundleName</CODE> - the resource bundle name<DD><CODE>bundleVarName</CODE> - the resource bundle variable name<DD><CODE>type</CODE> - the resource bundle type<DD><CODE>bundleClassName</CODE> - the class name of the resource bundle which may be user defined<DD><CODE>extractStrType</CODE> - the type of extracting string method(getString(key), getString(key, defaultVal), getString(key, locale), or getString(key, defaultVal, locale))<DD><CODE>localeStr</CODE> - the locale variable string</DL></DD></DL><HR><A NAME="removeMessageToolResource(java.lang.String, java.lang.String)"><!-- --></A><H3>removeMessageToolResource</H3><PRE>public <A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> <B>removeMessageToolResource</B>(java.lang.String className, java.lang.String bundleVarName)</PRE><DL><DD>remove a resource bundle definition statement in a class.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#removeMessageToolResource(java.lang.String, java.lang.String)">removeMessageToolResource</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>className</CODE> - the class name in which the definition statement nests.<DD><CODE>bundleVarName</CODE> - the variable name of the resource bundle</DL></DD></DL><HR><A NAME="getMessageToolClassUnit(int)"><!-- --></A><H3>getMessageToolClassUnit</H3><PRE>public <A HREF="../../../../../com/sun/tdc/toolkit/api/internal/ClassUnit.html">ClassUnit</A> <B>getMessageToolClassUnit</B>(int offset)</PRE><DL><DD>Get a MessageTool class unit by the offset from the beginning of the file.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#getMessageToolClassUnit(int)">getMessageToolClassUnit</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset in the java file<DT><B>Returns:</B><DD>the class unit according to the offset</DL></DD></DL><HR><A NAME="getMessageUnits()"><!-- --></A><H3>getMessageUnits</H3><PRE>public <A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A>[] <B>getMessageUnits</B>()</PRE><DL><DD>get all concerned message units<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#getMessageUnits()">getMessageUnits</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Returns:</B><DD>all concerned message units (message units)</DL></DD></DL><HR><A NAME="updateUnit(com.sun.tdc.toolkit.api.internal.Unit, java.lang.String)"><!-- --></A><H3>updateUnit</H3><PRE>public <A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> <B>updateUnit</B>(<A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> unit, java.lang.String value)</PRE><DL><DD>Update the whole unit with the new String This may cause the error on the document. So it must be implemented in JavaDocument.<DD><DL><DT><B>Overrides:</B><DD>updateUnit in class com.sun.tdc.toolkit.javafile.JavaFile</DL></DD></DL><HR><A NAME="convert(com.sun.tdc.toolkit.api.internal.Unit)"><!-- --></A><H3>convert</H3><PRE>public java.lang.String <B>convert</B>(<A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> unit) throws <A HREF="../../../../../com/sun/tdc/toolkit/api/NoBundleDefinedException.html">NoBundleDefinedException</A></PRE><DL><DD>Convert the unit into internationalized unit.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#convert(com.sun.tdc.toolkit.api.internal.Unit)">convert</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>unit</CODE> - the unit to be converted<DT><B>Returns:</B><DD>the unit which was converted into.</DL></DD></DL><HR><A NAME="convert(com.sun.tdc.toolkit.api.internal.Unit, java.lang.String)"><!-- --></A><H3>convert</H3><PRE>public java.lang.String <B>convert</B>(<A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> unit, java.lang.String bundleVarName) throws <A HREF="../../../../../com/sun/tdc/toolkit/api/NoBundleDefinedException.html">NoBundleDefinedException</A></PRE><DL><DD>Convert the unit into internationalized unit.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#convert(com.sun.tdc.toolkit.api.internal.Unit, java.lang.String)">convert</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>unit</CODE> - the unit to be converted<DD><CODE>bundleVarName</CODE> - the variable name of the resource bundle<DT><B>Returns:</B><DD>the unit which was converted into.</DL></DD></DL><HR><A NAME="convert(com.sun.tdc.toolkit.api.internal.Unit, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>convert</H3><PRE>public java.lang.String <B>convert</B>(<A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> unit, java.lang.String bundleVarName, int methodType, java.lang.String key, java.lang.String defaultValue, java.lang.String localeVarString) throws <A HREF="../../../../../com/sun/tdc/toolkit/api/NoBundleDefinedException.html">NoBundleDefinedException</A></PRE><DL><DD>Convert the unit into internationalized unit.<DD><DL><DT><B>Parameters:</B><DD><CODE>unit</CODE> - the unit to be converted<DD><CODE>bundleVarName</CODE> - the variable name of the resource bundle<DD><CODE>methodType</CODE> - the type of extracting message method<DD><CODE>key</CODE> - the key used for extracting message<DD><CODE>defaultValue</CODE> - the default value used for extracting message<DD><CODE>localeVarString</CODE> - the name of locale variable in extracting message method<DT><B>Returns:</B><DD>the unit which was converted into.</DL></DD></DL><HR><A NAME="setConvertedUnit(com.sun.tdc.toolkit.api.internal.Unit, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>setConvertedUnit</H3><PRE>public java.lang.String <B>setConvertedUnit</B>(<A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> unit, java.lang.String bundleVarName, int methodType, java.lang.String key, java.lang.String defaultValue, java.lang.String localeVarString) throws <A HREF="../../../../../com/sun/tdc/toolkit/api/NoBundleDefinedException.html">NoBundleDefinedException</A></PRE><DL><DD>reset the internationalized unit.<DD><DL><DT><B>Parameters:</B><DD><CODE>unit</CODE> - the unit to be set<DD><CODE>bundleVarName</CODE> - the variable name of the resource bundle<DD><CODE>methodType</CODE> - the type of extracting message method<DD><CODE>key</CODE> - the key used for extracting message<DD><CODE>defaultValue</CODE> - the default value used for extracting message<DD><CODE>localeVarString</CODE> - the name of locale variable in extracting message method<DT><B>Returns:</B><DD>the unit which was reset into.</DL></DD></DL><HR><A NAME="revert(com.sun.tdc.toolkit.api.internal.Unit)"><!-- --></A><H3>revert</H3><PRE>public java.lang.String <B>revert</B>(<A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> unit)</PRE><DL><DD>Revert the internationalized unit.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#revert(com.sun.tdc.toolkit.api.internal.Unit)">revert</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>unit</CODE> - the unit to be reverted<DT><B>Returns:</B><DD>the unit which was reconverted into.</DL></DD></DL><HR><A NAME="revert(com.sun.tdc.toolkit.api.internal.Unit, boolean)"><!-- --></A><H3>revert</H3><PRE>public java.lang.String <B>revert</B>(<A HREF="../../../../../com/sun/tdc/toolkit/api/internal/Unit.html">Unit</A> unit, boolean needRemoveBundle)</PRE><DL><DD>Revert the internationalized unit.<DD><DL><DT><B>Specified by: </B><DD><A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html#revert(com.sun.tdc.toolkit.api.internal.Unit, boolean)">revert</A> in interface <A HREF="../../../../../com/sun/tdc/toolkit/api/MessageToolInterface.html">MessageToolInterface</A><DT><B>Parameters:</B><DD><CODE>unit</CODE> - the unit to be reverted<DD><CODE>needRemoveBundle</CODE> - if the bundle needs to be removed when there is no unit using it.<DT><B>Returns:</B><DD>the unit which was reconverted into.</DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -