PageRenderTime 91ms CodeModel.GetById 39ms RepoModel.GetById 1ms app.codeStats 0ms

/apache-log4j-1.2.17/site/apidocs/org/apache/log4j/rewrite/ReflectionRewritePolicy.html

#
HTML | 277 lines | 223 code | 32 blank | 22 comment | 0 complexity | a908a5528e9d270ae743b752a8efa5ff MD5 | raw file
Possible License(s): Apache-2.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_23) -->
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <TITLE>
  8. ReflectionRewritePolicy (Apache Log4j 1.2.17 API)
  9. </TITLE>
  10. <META NAME="date" CONTENT="2012-05-06">
  11. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  12. <SCRIPT type="text/javascript">
  13. function windowTitle()
  14. {
  15. if (location.href.indexOf('is-external=true') == -1) {
  16. parent.document.title="ReflectionRewritePolicy (Apache Log4j 1.2.17 API)";
  17. }
  18. }
  19. </SCRIPT>
  20. <NOSCRIPT>
  21. </NOSCRIPT>
  22. </HEAD>
  23. <BODY BGCOLOR="white" onload="windowTitle();">
  24. <HR>
  25. <!-- ========= START OF TOP NAVBAR ======= -->
  26. <A NAME="navbar_top"><!-- --></A>
  27. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  28. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  29. <TR>
  30. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  31. <A NAME="navbar_top_firstrow"><!-- --></A>
  32. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  33. <TR ALIGN="center" VALIGN="top">
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  36. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ReflectionRewritePolicy.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  40. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  41. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  42. </TR>
  43. </TABLE>
  44. </TD>
  45. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  46. </EM>
  47. </TD>
  48. </TR>
  49. <TR>
  50. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  51. &nbsp;<A HREF="../../../../org/apache/log4j/rewrite/PropertyRewritePolicy.html" title="class in org.apache.log4j.rewrite"><B>PREV CLASS</B></A>&nbsp;
  52. &nbsp;<A HREF="../../../../org/apache/log4j/rewrite/RewriteAppender.html" title="class in org.apache.log4j.rewrite"><B>NEXT CLASS</B></A></FONT></TD>
  53. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  54. <A HREF="../../../../index.html?org/apache/log4j/rewrite/ReflectionRewritePolicy.html" target="_top"><B>FRAMES</B></A> &nbsp;
  55. &nbsp;<A HREF="ReflectionRewritePolicy.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  56. &nbsp;<SCRIPT type="text/javascript">
  57. <!--
  58. if(window==top) {
  59. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  60. }
  61. //-->
  62. </SCRIPT>
  63. <NOSCRIPT>
  64. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  65. </NOSCRIPT>
  66. </FONT></TD>
  67. </TR>
  68. <TR>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  71. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  72. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  73. </TR>
  74. </TABLE>
  75. <A NAME="skip-navbar_top"></A>
  76. <!-- ========= END OF TOP NAVBAR ========= -->
  77. <HR>
  78. <!-- ======== START OF CLASS DATA ======== -->
  79. <H2>
  80. <FONT SIZE="-1">
  81. org.apache.log4j.rewrite</FONT>
  82. <BR>
  83. Class ReflectionRewritePolicy</H2>
  84. <PRE>
  85. <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  86. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.log4j.rewrite.ReflectionRewritePolicy</B>
  87. </PRE>
  88. <DL>
  89. <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/apache/log4j/rewrite/RewritePolicy.html" title="interface in org.apache.log4j.rewrite">RewritePolicy</A></DD>
  90. </DL>
  91. <HR>
  92. <DL>
  93. <DT><PRE>public class <B>ReflectionRewritePolicy</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../org/apache/log4j/rewrite/RewritePolicy.html" title="interface in org.apache.log4j.rewrite">RewritePolicy</A></DL>
  94. </PRE>
  95. <P>
  96. This policy rewrites events by evaluating any
  97. JavaBean properties on the message object and adding them
  98. to the event properties. If the message object has a
  99. message property, the value of that property will be
  100. used as the message for the rewritten event and will
  101. not be added to the event properties. Values from the
  102. JavaBean properties will replace any existing property
  103. with the same name.
  104. The combination of the RewriteAppender and this policy
  105. performs the same actions as the ReflectionFilter from log4j 1.3.
  106. <P>
  107. <P>
  108. <HR>
  109. <P>
  110. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  111. <A NAME="constructor_summary"><!-- --></A>
  112. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  113. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  114. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  115. <B>Constructor Summary</B></FONT></TH>
  116. </TR>
  117. <TR BGCOLOR="white" CLASS="TableRowColor">
  118. <TD><CODE><B><A HREF="../../../../org/apache/log4j/rewrite/ReflectionRewritePolicy.html#ReflectionRewritePolicy()">ReflectionRewritePolicy</A></B>()</CODE>
  119. <BR>
  120. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  121. </TR>
  122. </TABLE>
  123. &nbsp;
  124. <!-- ========== METHOD SUMMARY =========== -->
  125. <A NAME="method_summary"><!-- --></A>
  126. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  127. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  128. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  129. <B>Method Summary</B></FONT></TH>
  130. </TR>
  131. <TR BGCOLOR="white" CLASS="TableRowColor">
  132. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  133. <CODE>&nbsp;<A HREF="../../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A></CODE></FONT></TD>
  134. <TD><CODE><B><A HREF="../../../../org/apache/log4j/rewrite/ReflectionRewritePolicy.html#rewrite(org.apache.log4j.spi.LoggingEvent)">rewrite</A></B>(<A HREF="../../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A>&nbsp;source)</CODE>
  135. <BR>
  136. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rewrite a logging event.</TD>
  137. </TR>
  138. </TABLE>
  139. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  140. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  141. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  142. <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
  143. </TR>
  144. <TR BGCOLOR="white" CLASS="TableRowColor">
  145. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
  146. </TR>
  147. </TABLE>
  148. &nbsp;
  149. <P>
  150. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  151. <A NAME="constructor_detail"><!-- --></A>
  152. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  153. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  154. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  155. <B>Constructor Detail</B></FONT></TH>
  156. </TR>
  157. </TABLE>
  158. <A NAME="ReflectionRewritePolicy()"><!-- --></A><H3>
  159. ReflectionRewritePolicy</H3>
  160. <PRE>
  161. public <B>ReflectionRewritePolicy</B>()</PRE>
  162. <DL>
  163. </DL>
  164. <!-- ============ METHOD DETAIL ========== -->
  165. <A NAME="method_detail"><!-- --></A>
  166. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  167. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  168. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  169. <B>Method Detail</B></FONT></TH>
  170. </TR>
  171. </TABLE>
  172. <A NAME="rewrite(org.apache.log4j.spi.LoggingEvent)"><!-- --></A><H3>
  173. rewrite</H3>
  174. <PRE>
  175. public <A HREF="../../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A> <B>rewrite</B>(<A HREF="../../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A>&nbsp;source)</PRE>
  176. <DL>
  177. <DD>Rewrite a logging event.
  178. <P>
  179. <DD><DL>
  180. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/log4j/rewrite/RewritePolicy.html#rewrite(org.apache.log4j.spi.LoggingEvent)">rewrite</A></CODE> in interface <CODE><A HREF="../../../../org/apache/log4j/rewrite/RewritePolicy.html" title="interface in org.apache.log4j.rewrite">RewritePolicy</A></CODE></DL>
  181. </DD>
  182. <DD><DL>
  183. <DT><B>Parameters:</B><DD><CODE>source</CODE> - a logging event that may be returned or
  184. used to create a new logging event.
  185. <DT><B>Returns:</B><DD>a logging event or null to suppress processing.</DL>
  186. </DD>
  187. </DL>
  188. <!-- ========= END OF CLASS DATA ========= -->
  189. <HR>
  190. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  191. <A NAME="navbar_bottom"><!-- --></A>
  192. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  193. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  194. <TR>
  195. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  196. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  197. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  198. <TR ALIGN="center" VALIGN="top">
  199. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  200. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  201. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  202. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ReflectionRewritePolicy.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  203. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  204. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  205. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  206. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  207. </TR>
  208. </TABLE>
  209. </TD>
  210. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  211. </EM>
  212. </TD>
  213. </TR>
  214. <TR>
  215. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  216. &nbsp;<A HREF="../../../../org/apache/log4j/rewrite/PropertyRewritePolicy.html" title="class in org.apache.log4j.rewrite"><B>PREV CLASS</B></A>&nbsp;
  217. &nbsp;<A HREF="../../../../org/apache/log4j/rewrite/RewriteAppender.html" title="class in org.apache.log4j.rewrite"><B>NEXT CLASS</B></A></FONT></TD>
  218. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  219. <A HREF="../../../../index.html?org/apache/log4j/rewrite/ReflectionRewritePolicy.html" target="_top"><B>FRAMES</B></A> &nbsp;
  220. &nbsp;<A HREF="ReflectionRewritePolicy.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  221. &nbsp;<SCRIPT type="text/javascript">
  222. <!--
  223. if(window==top) {
  224. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  225. }
  226. //-->
  227. </SCRIPT>
  228. <NOSCRIPT>
  229. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  230. </NOSCRIPT>
  231. </FONT></TD>
  232. </TR>
  233. <TR>
  234. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  235. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  236. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  237. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  238. </TR>
  239. </TABLE>
  240. <A NAME="skip-navbar_bottom"></A>
  241. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  242. <HR>
  243. Copyright &#169; 1999-2012 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
  244. </BODY>
  245. </HTML>