001: /*
002: * Hammurapi
003: * Automated Java code review system.
004: * Copyright (C) 2004 Hammurapi Group
005: *
006: * This program is free software; you can redistribute it and/or modify
007: * it under the terms of the GNU General Public License as published by
008: * the Free Software Foundation; either version 2 of the License, or
009: * (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * URL: http://www.hammurapi.org
021: * e-Mail: support@hammurapi.biz
022: */
023: package org.hammurapi.inspectors.testcases.violations;
024:
025: /**
026: * NamingStandardRule
027: * @author Pavel Vlasov
028: * @version $Revision: 1.1 $
029: */
030: public class NamingStandardRuleViolationTestCase {
031:
032: private static org.apache.log4j.Logger logger = org.apache.log4j.Logger
033: .getRootLogger();
034:
035: private class InnerClass1 {
036:
037: // --- VIOLATION ---
038: private static final int attrFirst = INT_12;
039:
040: boolean attrBoolean;
041: }
042:
043: //--- VIOLATION ---
044: private class innerClass2 {
045: private static final int ATTRFIRST = INT_12;
046: boolean attrBoolean;
047: }
048:
049: //--- VIOLATION ---
050: private class Inner_Class {
051:
052: // --- VIOLATION ---
053: private static final int attrFirst = INT_12;
054:
055: boolean attrBoolean;
056: }
057:
058: private static final int INT_12 = 12;
059: private static final String ANATTRIBUTE = "ASDF";
060: public final String /** Java doc automaticaly generated by Hammurapi */
061: anAttribute = ANATTRIBUTE;
062: protected java.util.Date /** Java doc automaticaly generated by Hammurapi */
063: fromDate;
064:
065: //--- VIOLATION ---
066: private static final String ANAtTRIBUTE2 = ANATTRIBUTE;
067:
068: // --- VIOLATION ---
069: public final String /** Java doc automaticaly generated by Hammurapi */
070: AnAttribute2 = ANATTRIBUTE;
071:
072: // --- VIOLATION ---
073: protected java.util.Date /** Java doc automaticaly generated by Hammurapi */
074: from_Date2;
075:
076: void method1() {
077: }
078:
079: //--- VIOLATION ---
080: void Method2() {
081: }
082:
083: private static String methodToCall(final Integer parOne,
084: final String parTwo) {
085:
086: // --- VIOLATION ---
087: String S = ANATTRIBUTE;
088:
089: return S;
090: }
091:
092: //--- VIOLATION ---
093: private static String methodToCall(final Long ParOne) {
094: String s = ANATTRIBUTE;
095: return s;
096: }
097:
098: //--- VIOLATION ---
099: private static String methodToC_all(final Long parOne,
100: final String par_Two) {
101:
102: String s = ANATTRIBUTE;
103: return s;
104: }
105: }
|