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

net.sourceforge.pmd.lang.java.ast.ASTMemberValue Maven / Gradle / Ivy

There is a newer version: 7.7.0
Show newest version
/**
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

package net.sourceforge.pmd.lang.java.ast;

import org.checkerframework.checker.nullness.qual.Nullable;

/**
 * Represents the value of a member of an annotation.
 * This can appear in a {@linkplain ASTMemberValuePair member-value pair},
 * or in the {@linkplain ASTDefaultValue default clause} of an annotation
 * method.
 *
 * 
 *
 * MemberValue ::= {@link ASTAnnotation Annotation}
 *               | {@link ASTMemberValueArrayInitializer MemberValueArrayInitializer}
 *               | {@link ASTExpression < any constant expression >}
 *
 * 
*/ public interface ASTMemberValue extends JavaNode { /** * Returns the constant value of this node, if this is a constant * expression. Otherwise, or if some references couldn't be resolved, * returns null. Note that {@link ASTNullLiteral null} is not a constant * value, so this method's returning null is not a problem. Note that * annotations are not given a constant value by this implementation. */ default @Nullable Object getConstValue() { return null; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy