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

org.aspectj.org.eclipse.jdt.core.IField Maven / Gradle / Ivy

There is a newer version: 1.9.22.1
Show newest version
/*******************************************************************************
 * Copyright (c) 2000, 2013 IBM Corporation 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:
 *     IBM Corporation - initial API and implementation
 *     IBM Corporation - added J2SE 1.5 support
 *******************************************************************************/
package org.aspectj.org.eclipse.jdt.core;

/**
 * Represents a field declared in a type.
 *
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface IField extends IMember, IAnnotatable {

/**
 * Returns the constant value associated with this field
 * or null if this field has none. To have a constant value, the field needs to be
 * final and initialized with a compile-time constant expression.
 * 

* For types from source, this currently only works if the field initializer is a literal (returns * null for more complex constant expressions). *

*

* For primitive types, returns the boxed value. *

* * @return the constant value associated with this field, or null if not available * @exception JavaModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource */ public Object getConstant() throws JavaModelException; /** * Returns the simple name of this field. * @return the simple name of this field. */ String getElementName(); /** * Returns the binding key for this field only if the given field is {@link #isResolved() resolved}. * A binding key is a key that uniquely identifies this field. It allows access to generic info * for parameterized fields. * *

If the given field is not resolved, the returned key is simply the java element's key. *

* @return the binding key for this field * @see org.aspectj.org.eclipse.jdt.core.dom.IBinding#getKey() * @see BindingKey * @see #isResolved() * @since 3.1 */ String getKey(); /** * Returns the type signature of this field. For enum constants, * this returns the signature of the declaring enum class. *

* The type signature may be either unresolved (for source types) * or resolved (for binary types), and either basic (for basic types) * or rich (for parameterized types). See {@link Signature} for details. *

* * @return the type signature of this field * @exception JavaModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource * @see Signature */ String getTypeSignature() throws JavaModelException; /** * Returns whether this field represents an enum constant. * * @return whether this field represents an enum constant * @exception JavaModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource * @since 3.1 */ boolean isEnumConstant() throws JavaModelException; /** * Returns whether this field represents a resolved field. * If a field is resolved, its key contains resolved information. * * @return whether this field represents a resolved field. * @since 3.1 */ boolean isResolved(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy