1 package com.puppycrawl.tools.checkstyle.api; 20 21 import java.util.EventObject ; 22 23 24 39 public final class AuditEvent 40 extends EventObject 41 { 42 43 private final String mFileName; 44 45 private final LocalizedMessage mMessage; 46 47 51 public AuditEvent(Object aSource) 52 { 53 this(aSource, null); 54 } 55 56 61 public AuditEvent(Object aSrc, String aFileName) 62 { 63 this(aSrc, aFileName, null); 64 } 65 66 73 public AuditEvent(Object aSrc, String aFileName, LocalizedMessage aMessage) 74 { 75 super(aSrc); 76 mFileName = aFileName; 77 mMessage = aMessage; 78 } 79 80 84 public String getFileName() 85 { 86 return mFileName; 87 } 88 89 94 public int getLine() 95 { 96 return mMessage.getLineNo(); 97 } 98 99 103 public String getMessage() 104 { 105 return mMessage.getMessage(); 106 } 107 108 109 public int getColumn() 110 { 111 return mMessage.getColumnNo(); 112 } 113 114 115 public SeverityLevel getSeverityLevel() 116 { 117 return (mMessage == null) 118 ? SeverityLevel.INFO 119 : mMessage.getSeverityLevel(); 120 } 121 122 126 public String getModuleId() 127 { 128 return mMessage.getModuleId(); 129 } 130 131 132 public String getSourceName() 133 { 134 return mMessage.getSourceName(); 135 } 136 137 138 public LocalizedMessage getLocalizedMessage() 139 { 140 return mMessage; 141 } 142 } 143 | Popular Tags |