1 /******************************************************************************* 2 * Copyright (c) 2008, 2013 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.pde.api.tools.internal.provisional.builder; 15 16 import java.util.List; 17 18 import org.eclipse.core.runtime.IProgressMonitor; 19 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem; 20 21 /** 22 * Detects API use problems and leaks. 23 * 24 * @since 1.1 25 */ 26 public interface IApiProblemDetector { 27 28 /** 29 * Returns a bit mask of reference kinds this analyzer is interested in. 30 * 31 * @return bit mask of {@link ReferenceModifiers} constants 32 */ getReferenceKinds()33 public int getReferenceKinds(); 34 35 /** 36 * Returns whether the given unresolved reference is a potential problem. 37 * This analyzer should retain the reference if it is a potential problem 38 * for further analysis once references have been resolved. 39 * 40 * @param reference potential problem 41 * @return whether the unresolved reference is a potential problem 42 */ considerReference(IReference reference)43 public boolean considerReference(IReference reference); 44 45 /** 46 * Returns a list of any problems detected after analyzing potential 47 * reference problems that are now resolved. 48 * 49 * @param monitor the monitor to report progress. 50 * @return list of 51 * {@link org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem} 52 */ createProblems(IProgressMonitor monitor)53 public List<IApiProblem> createProblems(IProgressMonitor monitor); 54 } 55