net.bytebuddy.description.ByteCodeElement Maven / Gradle / Ivy
package net.bytebuddy.description;
import net.bytebuddy.description.annotation.AnnotatedCodeElement;
import net.bytebuddy.description.type.DeclaredInType;
import net.bytebuddy.description.type.TypeDescription;
/**
* Implementations describe an element represented in byte code, i.e. a type, a field or a method or a constructor.
*/
public interface ByteCodeElement extends NamedElement, ModifierReviewable, DeclaredInType, AnnotatedCodeElement {
/**
* Returns the descriptor of this byte code element.
*
* @return The descriptor of this byte code element.
*/
String getDescriptor();
/**
* Returns the generic signature of this byte code element.
*
* @return The generic signature or {@code null} if this element is not generic.
*/
String getGenericSignature();
/**
* Checks if this element is visible from a given type. Methods are only considered visible if their return type and their parameter
* types are also visible to the given type. Similarly, fields are only considered visible if the field's type is visible to the
* given type. For array types, a type is considered visible only if the component type is visible to the given type.
*
* @param typeDescription The type which is checked for its access of this element.
* @return {@code true} if this element is visible for {@code typeDescription}.
*/
boolean isVisibleTo(TypeDescription typeDescription);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy