public static class TypePool.Default.LazyTypeDescription.DeclarationContext.DeclaredInMethod extends Object implements TypePool.Default.LazyTypeDescription.DeclarationContext
TypePool.Default.LazyTypeDescription.DeclarationContext.DeclaredInMethod, TypePool.Default.LazyTypeDescription.DeclarationContext.DeclaredInType, TypePool.Default.LazyTypeDescription.DeclarationContext.SelfDeclared
Constructor and Description |
---|
DeclaredInMethod(String internalName,
String methodName,
String methodDescriptor)
Creates a new declaration context for a method that declares a type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
MethodDescription |
getEnclosingMethod(TypePool typePool)
Returns the enclosing method or
null if no such method exists. |
TypeDescription |
getEnclosingType(TypePool typePool)
Returns the enclosing type or
null if no such type exists. |
int |
hashCode() |
boolean |
isDeclaredInMethod()
Returns
true if this instance represents a type that was declared within a method. |
boolean |
isDeclaredInType()
Returns
true if this instance represents a type that was declared within another type but not
within a method. |
boolean |
isSelfDeclared()
Returns
true if this instance represents a self declared type. |
String |
toString() |
public DeclaredInMethod(String internalName, String methodName, String methodDescriptor)
internalName
- The internal name of the declaring type.methodName
- The name of the method that is declaring a type.methodDescriptor
- The descriptor of the method that is declaring a type.public MethodDescription getEnclosingMethod(TypePool typePool)
TypePool.Default.LazyTypeDescription.DeclarationContext
null
if no such method exists.getEnclosingMethod
in interface TypePool.Default.LazyTypeDescription.DeclarationContext
typePool
- The type pool to be used for looking up linked types.null
.public TypeDescription getEnclosingType(TypePool typePool)
TypePool.Default.LazyTypeDescription.DeclarationContext
null
if no such type exists.getEnclosingType
in interface TypePool.Default.LazyTypeDescription.DeclarationContext
typePool
- The type pool to be used for looking up linked types.null
.public boolean isSelfDeclared()
TypePool.Default.LazyTypeDescription.DeclarationContext
true
if this instance represents a self declared type.isSelfDeclared
in interface TypePool.Default.LazyTypeDescription.DeclarationContext
true
if this instance represents a self declared type.public boolean isDeclaredInType()
TypePool.Default.LazyTypeDescription.DeclarationContext
true
if this instance represents a type that was declared within another type but not
within a method.isDeclaredInType
in interface TypePool.Default.LazyTypeDescription.DeclarationContext
true
if this instance represents a type that was declared within another type but not
within a method.public boolean isDeclaredInMethod()
TypePool.Default.LazyTypeDescription.DeclarationContext
true
if this instance represents a type that was declared within a method.isDeclaredInMethod
in interface TypePool.Default.LazyTypeDescription.DeclarationContext
true
if this instance represents a type that was declared within a method.Copyright © 2014–2016. All rights reserved.