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