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

javax.lang.model.element.AnnotationValue Maven / Gradle / Ivy

/*
 * Copyright (C) 2021 ZeoFlow SRL
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package javax.lang.model.element;

/**
 * Represents a value of an annotation type element.
 * A value is of one of the following types:
 * 
  • a wrapper class (such as {@link Integer}) for a primitive type *
  • {@code String} *
  • {@code TypeMirror} *
  • {@code VariableElement} (representing an enum constant) *
  • {@code AnnotationMirror} *
  • {@code List} * (representing the elements, in declared order, if the value is an array) *
* * @author Joseph D. Darcy * @author Scott Seligman * @author Peter von der Ahé * @since 1.6 */ public interface AnnotationValue { /** * Returns the value. * * @return the value */ Object getValue(); /** * Returns a string representation of this value. * This is returned in a form suitable for representing this value * in the source code of an annotation. * * @return a string representation of this value */ String toString(); /** * Applies a visitor to this value. * * @param the return type of the visitor's methods * @param

the type of the additional parameter to the visitor's methods * @param v the visitor operating on this value * @param p additional parameter to the visitor * * @return a visitor-specified result */ R accept(AnnotationValueVisitor v, P p); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy