mcimadamore@83: /* ohair@798: * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. mcimadamore@83: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@83: * mcimadamore@83: * This code is free software; you can redistribute it and/or modify it mcimadamore@83: * under the terms of the GNU General Public License version 2 only, as ohair@554: * published by the Free Software Foundation. Oracle designates this mcimadamore@83: * particular file as subject to the "Classpath" exception as provided ohair@554: * by Oracle in the LICENSE file that accompanied this code. mcimadamore@83: * mcimadamore@83: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@83: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@83: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@83: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@83: * accompanied this code). mcimadamore@83: * mcimadamore@83: * You should have received a copy of the GNU General Public License version mcimadamore@83: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@83: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@83: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. mcimadamore@83: */ mcimadamore@83: package com.sun.tools.javac.util; mcimadamore@83: mcimadamore@221: import java.util.Arrays; mcimadamore@83: import java.util.Collection; mcimadamore@221: import java.util.EnumSet; mcimadamore@221: import java.util.HashMap; mcimadamore@83: import java.util.Locale; mcimadamore@221: import java.util.Map; mcimadamore@221: import java.util.Set; mcimadamore@83: import javax.tools.JavaFileObject; mcimadamore@83: mcimadamore@83: import com.sun.tools.javac.api.DiagnosticFormatter; mcimadamore@221: import com.sun.tools.javac.api.DiagnosticFormatter.Configuration.DiagnosticPart; mcimadamore@221: import com.sun.tools.javac.api.DiagnosticFormatter.Configuration.MultilineLimit; mcimadamore@221: import com.sun.tools.javac.api.DiagnosticFormatter.PositionKind; mcimadamore@83: import com.sun.tools.javac.api.Formattable; jjg@612: import com.sun.tools.javac.code.Lint.LintCategory; mcimadamore@238: import com.sun.tools.javac.code.Printer; mcimadamore@238: import com.sun.tools.javac.code.Symbol; mcimadamore@238: import com.sun.tools.javac.code.Type; mcimadamore@238: import com.sun.tools.javac.code.Type.CapturedType; mcimadamore@221: jjg@415: import com.sun.tools.javac.file.BaseFileObject; mcimadamore@137: import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticType.*; mcimadamore@83: mcimadamore@83: /** mcimadamore@83: * This abstract class provides a basic implementation of the functionalities that should be provided mcimadamore@83: * by any formatter used by javac. Among the main features provided by AbstractDiagnosticFormatter are: mcimadamore@83: * mcimadamore@83: *