public class InnerClasses extends Attribute
Modifier and Type | Method and Description |
---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a
BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
InnerClass |
addInnerClass()
Add an inner class.
|
InnerClass |
addInnerClass(InnerClass inner)
Import an inner class from another entity, or make a copy of one
on this entity.
|
InnerClass |
addInnerClass(String name,
BCClass type,
BCClass owner)
Add an inner class.
|
InnerClass |
addInnerClass(String name,
Class type,
Class owner)
Add an inner class.
|
InnerClass |
addInnerClass(String name,
String type,
String owner)
Add an inner class.
|
void |
clear()
Clear all inner classes from this entity.
|
InnerClass |
getInnerClass(String name)
Return the inner class with the given name.
|
InnerClass[] |
getInnerClasses()
Return all referenced inner classes, or empty array if none.
|
InnerClass[] |
getInnerClasses(String name)
Return all inner classes with the given name, or empty array if none.
|
boolean |
removeInnerClass(InnerClass innerClass)
Remove the given inner class.
|
boolean |
removeInnerClass(String name)
Remove the inner class with the given name.
|
void |
setInnerClasses(InnerClass[] inners)
Set the inner class references for this class.
|
getClassLoader, getName, getNameIndex, getOwner, getPool, getProject, isValid
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes
public InnerClass[] getInnerClasses()
public InnerClass getInnerClass(String name)
public InnerClass[] getInnerClasses(String name)
public void setInnerClasses(InnerClass[] inners)
public InnerClass addInnerClass(InnerClass inner)
public InnerClass addInnerClass()
public InnerClass addInnerClass(String name, String type, String owner)
name
- the simple name of the class, or null if anonymoustype
- the full class name of the inner classowner
- the declaring class, or null if not a member classpublic InnerClass addInnerClass(String name, Class type, Class owner)
name
- the simple name of the class, or null if anonymoustype
- the class of the inner classowner
- the declaring class, or null if not a member classpublic InnerClass addInnerClass(String name, BCClass type, BCClass owner)
name
- the simple name of the class, or null if anonymoustype
- the class of the inner classowner
- the declaring class, or null if not a member classpublic void clear()
public boolean removeInnerClass(String name)
public boolean removeInnerClass(InnerClass innerClass)
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.Copyright © 2002–2019. All rights reserved.