public interface ByteCodeElement extends NamedElement.WithRuntimeName, ModifierReviewable, DeclaredByType, AnnotatedCodeElement
Modifier and Type | Interface and Description |
---|---|
static interface |
ByteCodeElement.Accessible
Describes a byte code element that can be accessed by another element.
|
static interface |
ByteCodeElement.Token<T extends ByteCodeElement.Token<T>>
Representation of a tokenized, detached byte code element.
|
static interface |
ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
A type dependant describes an element that is an extension of a type definition, i.e.
|
NamedElement.WithGenericName, NamedElement.WithRuntimeName
ModifierReviewable.AbstractBase
Modifier and Type | Field and Description |
---|---|
static String |
NON_GENERIC_SIGNATURE
The generic type signature of a non-generic byte code element.
|
EMPTY_NAME
EMPTY_MASK
Modifier and Type | Method and Description |
---|---|
String |
getDescriptor()
Returns the descriptor of this byte code element.
|
String |
getGenericSignature()
Returns the generic signature of this byte code element.
|
boolean |
isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type.
|
getInternalName, getName
getSourceCodeName
getModifiers, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
getDeclaringType
getDeclaredAnnotations
static final String NON_GENERIC_SIGNATURE
String getDescriptor()
String getGenericSignature()
null
is returned as a signature.null
if this element is not generic.boolean isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type.
Note: A method or field might define a signature that includes types that are not visible to a type. Such methods can be legally invoked from this type and can even be implemented as bridge methods by this type. It is however not legal to declare a method with invisible types in its signature that are not bridges what might require additional validation.
Important: Virtual byte code elements, i.e. virtual methods, are only considered visible if the type they are invoked upon is visible to a given type. The visibility of such virtual members can therefore not be determined by only investigating the invoked method but requires an additional check of the target type.
typeDescription
- The type which is checked for its access of this element.true
if this element is visible for typeDescription
.Copyright © 2014–2015. All rights reserved.