public static class TypePool.LazyTypeDescription.DeclarationContext.DeclaredInType extends Object implements TypePool.LazyTypeDescription.DeclarationContext
TypePool.LazyTypeDescription.DeclarationContext.DeclaredInMethod, TypePool.LazyTypeDescription.DeclarationContext.DeclaredInType, TypePool.LazyTypeDescription.DeclarationContext.SelfDeclared| Constructor and Description |
|---|
DeclaredInType(String internalName)
Creates a new declaration context for a type that is declared within another 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 DeclaredInType(String internalName)
internalName - The internal name of the declaring type.public MethodDescription getEnclosingMethod(TypePool typePool)
TypePool.LazyTypeDescription.DeclarationContextnull if no such method exists.getEnclosingMethod in interface TypePool.LazyTypeDescription.DeclarationContexttypePool - The type pool to be used for looking up linked types.null.public TypeDescription getEnclosingType(TypePool typePool)
TypePool.LazyTypeDescription.DeclarationContextnull if no such type exists.getEnclosingType in interface TypePool.LazyTypeDescription.DeclarationContexttypePool - The type pool to be used for looking up linked types.null.public boolean isSelfDeclared()
TypePool.LazyTypeDescription.DeclarationContexttrue if this instance represents a self declared type.isSelfDeclared in interface TypePool.LazyTypeDescription.DeclarationContexttrue if this instance represents a self declared type.public boolean isDeclaredInType()
TypePool.LazyTypeDescription.DeclarationContexttrue if this instance represents a type that was declared within another type but not
within a method.isDeclaredInType in interface TypePool.LazyTypeDescription.DeclarationContexttrue if this instance represents a type that was declared within another type but not
within a method.public boolean isDeclaredInMethod()
TypePool.LazyTypeDescription.DeclarationContexttrue if this instance represents a type that was declared within a method.isDeclaredInMethod in interface TypePool.LazyTypeDescription.DeclarationContexttrue if this instance represents a type that was declared within a method.Copyright © 2014–2015. All rights reserved.