All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jdt.internal.compiler.apt.model.AnnotationMemberValue Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright (c) 2009 Vladimir Piskarev and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Vladimir Piskarev - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.compiler.apt.model;

import org.eclipse.jdt.internal.compiler.apt.dispatch.BaseProcessingEnvImpl;
import org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding;
import org.eclipse.jdt.internal.compiler.lookup.ElementValuePair;
import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;

public class AnnotationMemberValue extends AnnotationValueImpl {

	private final MethodBinding _methodBinding;
	
	/**
	 * @param value
	 *            The JDT representation of a compile-time constant. See
	 *            {@link ElementValuePair#getValue()} for possible object types:
	 *            
    *
  • {@link org.eclipse.jdt.internal.compiler.impl.Constant} for member * of primitive type or String
  • *
  • {@link TypeBinding} for a member value of type * {@link java.lang.Class}
  • *
  • {@link FieldBinding} for an enum constant
  • *
  • {@link AnnotationBinding} for an annotation instance
  • *
  • Object[] for a member value of array type, where the * array entries are one of the above
  • *
* @param methodBinding the method binding that defined this member value pair */ public AnnotationMemberValue(BaseProcessingEnvImpl env, Object value, MethodBinding methodBinding) { super(env, value, methodBinding.returnType); _methodBinding = methodBinding; } /** * @return the method binding that defined this member value pair. */ public MethodBinding getMethodBinding() { return _methodBinding; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy