Package com.tonic.parser
Class MemberEntry
- java.lang.Object
-
- com.tonic.parser.MemberEntry
-
- Direct Known Subclasses:
FieldEntry,MethodEntry
public abstract class MemberEntry extends Object
Abstract base for field and method entries, holding the shared name/descriptor/access state.
-
-
Constructor Summary
Constructors Constructor Description MemberEntry()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetAccess()List<Attribute>getAttributes()ClassFilegetClassFile()StringgetDesc()intgetDescIndex()StringgetKey()StringgetName()intgetNameIndex()StringgetOwnerName()voidsetAccess(int access)voidsetAttributes(List<Attribute> attributes)voidsetClassFile(ClassFile classFile)voidsetDesc(String desc)voidsetDescIndex(int descIndex)voidsetKey(String key)voidsetName(String name)voidsetNameIndex(int nameIndex)voidsetOwnerName(String ownerName)abstract voidwrite(DataOutputStream dos)Writes this member entry to the output stream.
-
-
-
Method Detail
-
getOwnerName
public String getOwnerName()
- Returns:
- the owner name
-
getName
public String getName()
- Returns:
- the name
-
getDesc
public String getDesc()
- Returns:
- the desc
-
getKey
public String getKey()
- Returns:
- the key
-
getNameIndex
public int getNameIndex()
- Returns:
- the name index
-
getDescIndex
public int getDescIndex()
- Returns:
- the desc index
-
getClassFile
public ClassFile getClassFile()
- Returns:
- the class file
-
getAccess
public int getAccess()
- Returns:
- the access
-
setOwnerName
public void setOwnerName(String ownerName)
- Parameters:
ownerName- the internal name of the declaring class
-
setName
public void setName(String name)
- Parameters:
name- the member name
-
setDesc
public void setDesc(String desc)
- Parameters:
desc- the member descriptor
-
setKey
public void setKey(String key)
- Parameters:
key- the name+descriptor lookup key
-
setNameIndex
public void setNameIndex(int nameIndex)
- Parameters:
nameIndex- constant-pool index of the name Utf8
-
setDescIndex
public void setDescIndex(int descIndex)
- Parameters:
descIndex- constant-pool index of the descriptor Utf8
-
setClassFile
public void setClassFile(ClassFile classFile)
- Parameters:
classFile- the owning ClassFile
-
setAccess
public void setAccess(int access)
- Parameters:
access- the access flags
-
setAttributes
public void setAttributes(List<Attribute> attributes)
- Parameters:
attributes- the member attributes
-
write
public abstract void write(DataOutputStream dos) throws IOException
Writes this member entry to the output stream.- Parameters:
dos- the DataOutputStream to write to- Throws:
IOException- if an I/O error occurs
-
-