| 1 | /******************************************************************************* | 
| 2 |  * Copyright (c) 2008, 2009 IBM Corporation and others. | 
| 3 |  * All rights reserved. This program and the accompanying materials | 
| 4 |  * are made available under the terms of the Eclipse Public License v1.0 | 
| 5 |  * which accompanies this distribution, and is available at | 
| 6 |  * http://www.eclipse.org/legal/epl-v10.html | 
| 7 |  * | 
| 8 |  * Contributors: | 
| 9 |  *     IBM Corporation - initial API and implementation | 
| 10 |  *******************************************************************************/ | 
| 11 | package org.eclipse.pde.api.tools.internal.builder; | 
| 12 |   | 
| 13 | import java.util.Set; | 
| 14 |   | 
| 15 | import org.eclipse.pde.api.tools.internal.provisional.builder.IReference; | 
| 16 | import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem; | 
| 17 | import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemTypes; | 
| 18 |   | 
| 19 | /** | 
| 20 |  * Detects leaked implemented interfaces. | 
| 21 |  *  | 
| 22 |  * @since 1.1 | 
| 23 |  */ | 
| 24 | public class LeakImplementsProblemDetector extends AbstractTypeLeakDetector { | 
| 25 |   | 
| 26 |         /** | 
| 27 |          * @param nonApiPackageNames | 
| 28 |          */ | 
| 29 |         public LeakImplementsProblemDetector(Set nonApiPackageNames) { | 
| 30 |                 super(nonApiPackageNames); | 
| 31 |         } | 
| 32 |   | 
| 33 |         /* (non-Javadoc) | 
| 34 |          * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiProblemDetector#getReferenceKinds() | 
| 35 |          */ | 
| 36 |         public int getReferenceKinds() { | 
| 37 |                 return IReference.REF_IMPLEMENTS; | 
| 38 |         } | 
| 39 |   | 
| 40 |         /* (non-Javadoc) | 
| 41 |          * @see org.eclipse.pde.api.tools.internal.search.AbstractProblemDetector#getSeverityKey() | 
| 42 |          */ | 
| 43 |         protected String getSeverityKey() { | 
| 44 |                 return IApiProblemTypes.LEAK_IMPLEMENT; | 
| 45 |         } | 
| 46 |          | 
| 47 |         /* (non-Javadoc) | 
| 48 |          * @see org.eclipse.pde.api.tools.internal.search.AbstractProblemDetector#getProblemFlags(org.eclipse.pde.api.tools.internal.provisional.model.IReference) | 
| 49 |          */ | 
| 50 |         protected int getProblemFlags(IReference reference) { | 
| 51 |                 return IApiProblem.LEAK_IMPLEMENTS; | 
| 52 |         } | 
| 53 |   | 
| 54 | } |