public class ClassData
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
name
The internal (like the fully-qualified name, but with '/' instead
of '.') of the class.
|
java.lang.String |
nameMapped
The mapped internal (like the fully-qualified name, but with '/'
instead of '.') of the class.
|
| Constructor and Description |
|---|
ClassData(java.lang.String name,
java.lang.String nameMapped)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addField(java.lang.String plain,
java.lang.String mapped)
Adds a field to the target class.
|
void |
addField(java.lang.String plain,
java.lang.String mapped,
java.lang.String descriptor)
Adds a field to the target class.
|
void |
addMethod(java.lang.String name,
java.lang.String nameMapped,
java.lang.String descriptor)
Adds a method to the target class.
|
ClassData |
generateReverseMappings(Mapper mapper)
Generates the reverse mappings for this class.
|
java.util.Map<java.lang.String,FieldData> |
getFields()
Gets the underlying
Map for FieldData. |
java.util.Map<MethodSignature,MethodData> |
getMethods()
Gets the underlying
Map for MethodData. |
FieldData |
mapField(java.lang.String fieldName)
Gets the
FieldData its name. |
MethodData |
mapMethod(java.lang.String methodName,
java.lang.String methodDescriptor)
Gets the
MethodData from its name and descriptor, which may be partial
(i.e. |
public final java.lang.String name
public final java.lang.String nameMapped
public ClassData(java.lang.String name,
java.lang.String nameMapped)
name - the plain namenameMapped - the mapped namepublic void addMethod(java.lang.String name,
java.lang.String nameMapped,
java.lang.String descriptor)
name - the method namenameMapped - the mapped method namedescriptor - the descriptor of the methodpublic void addField(java.lang.String plain,
java.lang.String mapped)
plain - the name of the fieldmapped - the mapped name of the fieldpublic void addField(java.lang.String plain,
java.lang.String mapped,
java.lang.String descriptor)
plain - the name of the fieldmapped - the mapped name of the fielddescriptor - the plain type descriptor of the fieldpublic ClassData generateReverseMappings(Mapper mapper)
mapper - the mapper that generated this datapublic MethodData mapMethod(java.lang.String methodName, java.lang.String methodDescriptor)
MethodData from its name and descriptor, which may be partial
(i.e. not include the return type).methodName - the method namemethodDescriptor - the method descriptor, which may be partialMethodDataMappingNotFoundException - if the mapping wasn't foundpublic FieldData mapField(java.lang.String fieldName)
FieldData its name.fieldName - the field nameFieldDataMappingNotFoundException - if the mapping wasn't foundpublic java.util.Map<MethodSignature,MethodData> getMethods()
Map for MethodData.Map tying each MethodSignature to its MethodData