1 /*******************************************************************************
2  * Copyright (c) 2012, 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  *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
14  *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
15  *******************************************************************************/
16 package org.eclipse.jdt.internal.compiler.codegen;
17 
18 import org.eclipse.jdt.internal.compiler.ast.Annotation;
19 import org.eclipse.jdt.internal.compiler.ast.Expression;
20 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
21 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
22 
23 public class AnnotationContext {
24 	public static final int VISIBLE = 0x1;
25 	public static final int INVISIBLE = 0x2;
26 	public Annotation annotation;
27 	public Expression typeReference;
28 	public int targetType;
29 	public int info;
30 	public int info2;
31 	public int visibility;
32 	public LocalVariableBinding variableBinding;
33 	public Wildcard wildcard;
34 
AnnotationContext( Annotation annotation, Expression typeReference, int targetType, int visibility)35 	public AnnotationContext(
36 			Annotation annotation,
37 			Expression typeReference,
38 			int targetType,
39 			int visibility) {
40 		this.annotation = annotation;
41 		this.typeReference = typeReference;
42 		this.targetType = targetType;
43 		this.visibility = visibility;
44 	}
45 
46 	@Override
toString()47 	public String toString() {
48 		return "AnnotationContext [annotation=" //$NON-NLS-1$
49 				+ this.annotation
50 				+ ", typeReference=" //$NON-NLS-1$
51 				+ this.typeReference
52 				+ ", targetType=" //$NON-NLS-1$
53 				+ this.targetType
54 				+ ", info =" //$NON-NLS-1$
55 				+ this.info
56 				+ ", boundIndex=" //$NON-NLS-1$
57 				+ this.info2
58 				+ "]"; //$NON-NLS-1$
59 	}
60 }
61