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