001 /* 002 * SonarQube, open source software quality management tool. 003 * Copyright (C) 2008-2014 SonarSource 004 * mailto:contact AT sonarsource DOT com 005 * 006 * SonarQube is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 3 of the License, or (at your option) any later version. 010 * 011 * SonarQube 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 GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public License 017 * along with this program; if not, write to the Free Software Foundation, 018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 019 */ 020 package org.sonar.api.resources; 021 022 /** 023 * A class that represents a Java package in Sonar 024 * 025 * @since 1.10 026 * @deprecated since 4.2 use {@link Directory} instead 027 */ 028 @Deprecated 029 public class JavaPackage extends Resource { 030 031 public static final String DEFAULT_PACKAGE_NAME = "[default]"; 032 033 public JavaPackage() { 034 // For testing 035 } 036 037 public JavaPackage(String deprecatedKey) { 038 throw unsupported(); 039 } 040 041 public boolean isDefault() { 042 throw unsupported(); 043 } 044 045 @Override 046 public boolean matchFilePattern(String antPattern) { 047 throw unsupported(); 048 } 049 050 @Override 051 public String getDescription() { 052 throw unsupported(); 053 } 054 055 @Override 056 public String getScope() { 057 throw unsupported(); 058 } 059 060 @Override 061 public String getQualifier() { 062 throw unsupported(); 063 } 064 065 @Override 066 public String getName() { 067 throw unsupported(); 068 } 069 070 @Override 071 public Resource getParent() { 072 throw unsupported(); 073 } 074 075 @Override 076 public String getLongName() { 077 throw unsupported(); 078 } 079 080 @Override 081 public Language getLanguage() { 082 throw unsupported(); 083 } 084 085 private static UnsupportedOperationException unsupported() { 086 throw new UnsupportedOperationException("Not supported since v4.2. See http://redirect.sonarsource.com/doc/api-changes.html"); 087 } 088 }