M - The type of the class mappingP - The type of the parentpublic abstract class AbstractClassMappingImpl<M extends ClassMapping,P> extends AbstractMappingImpl<M,P> implements ClassMapping<M,P>
ClassMapping.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractClassMappingImpl(MappingSet mappings,
String obfuscatedName,
String deobfuscatedName)
Creates a new class mapping, from the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
protected StringJoiner |
buildToString() |
void |
complete(org.cadixdev.bombe.analysis.InheritanceProvider provider,
org.cadixdev.bombe.analysis.InheritanceProvider.ClassInfo info) |
Optional<FieldMapping> |
computeFieldMapping(org.cadixdev.bombe.type.signature.FieldSignature signature)
Attempts to locate a field mapping for the given obfuscated field
signature.
|
FieldMapping |
createFieldMapping(org.cadixdev.bombe.type.signature.FieldSignature signature,
String deobfuscatedName)
Creates a new field mapping, attached to this class mapping, using
the given signature and de-obfuscated name.
|
InnerClassMapping |
createInnerClassMapping(String obfuscatedName,
String deobfuscatedName)
Creates a new inner class mapping, attached to this class mapping, using
the given obfuscated and de-obfuscated class name.
|
MethodMapping |
createMethodMapping(org.cadixdev.bombe.type.signature.MethodSignature signature,
String deobfuscatedName)
Creates a new method mapping, attached to this class mapping, using
the given method signature and de-obfuscated name.
|
boolean |
equals(Object obj) |
Optional<FieldMapping> |
getFieldMapping(org.cadixdev.bombe.type.signature.FieldSignature signature)
Gets the field mapping of the given signature of the
class mapping, should it exist.
|
Optional<FieldMapping> |
getFieldMapping(String obfuscatedName)
Gets a field mapping of the given obfuscated name of the
class mapping, should it exist.
|
Collection<FieldMapping> |
getFieldMappings()
Gets an immutable collection of all of the field mappings
of the class mapping.
|
Map<String,FieldMapping> |
getFieldsByName()
Gets an immutable map of all of the field mappings
of the class mapping, by the field name.
|
Optional<InnerClassMapping> |
getInnerClassMapping(String obfuscatedName)
Gets the inner class mapping of the given obfuscated name of the
class mapping, should it exist.
|
Collection<InnerClassMapping> |
getInnerClassMappings()
Gets an immutable collection of all of the inner class
mappings of the class mapping.
|
Optional<MethodMapping> |
getMethodMapping(org.cadixdev.bombe.type.signature.MethodSignature signature)
Gets the method mapping of the given method signature of the
class mapping, should it exist.
|
Collection<MethodMapping> |
getMethodMappings()
Gets an immutable collection of all of the method mappings
of the class mapping.
|
boolean |
hasFieldMapping(org.cadixdev.bombe.type.signature.FieldSignature signature)
Establishes whether the class mapping contains a field mapping
of the given signature.
|
boolean |
hasFieldMapping(String obfuscatedName)
Establishes whether the class mapping contains a field mapping
of the given obfuscated name.
|
int |
hashCode() |
boolean |
hasInnerClassMapping(String obfuscatedName)
Establishes whether the class mapping contains a inner class
mapping of the given obfuscated name.
|
boolean |
hasMethodMapping(org.cadixdev.bombe.type.signature.MethodSignature signature)
Establishes whether the class mapping contains a method mapping
of the given obfuscated name.
|
boolean |
isComplete() |
getDeobfuscatedName, getMappings, getObfuscatedName, hasDeobfuscatedName, setDeobfuscatedName, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateFieldMapping, createFieldMapping, createFieldMapping, createInnerClassMapping, createMethodMapping, createMethodMapping, getDeobfuscatedPackage, getMethodMapping, getObfuscatedPackage, getOrCreateFieldMapping, getOrCreateFieldMapping, getOrCreateFieldMapping, getOrCreateInnerClassMapping, getOrCreateMethodMapping, getOrCreateMethodMapping, getSimpleDeobfuscatedName, getSimpleObfuscatedName, hasMappings, provideInheritancecopy, getDeobfuscatedName, getFullDeobfuscatedName, getFullObfuscatedName, getMappings, getObfuscatedName, hasDeobfuscatedName, merge, setDeobfuscatedNamereverseprotected AbstractClassMappingImpl(MappingSet mappings, String obfuscatedName, String deobfuscatedName)
mappings - The mappings set, this mapping belongs toobfuscatedName - The obfuscated namedeobfuscatedName - The de-obfuscated namepublic Collection<FieldMapping> getFieldMappings()
ClassMappinggetFieldMappings in interface ClassMapping<M extends ClassMapping,P>public Map<String,FieldMapping> getFieldsByName()
ClassMappinggetFieldsByName in interface ClassMapping<M extends ClassMapping,P>public Optional<FieldMapping> getFieldMapping(org.cadixdev.bombe.type.signature.FieldSignature signature)
ClassMappingNote: The field signature is looked up as-is,
so if the loaded mappings use field types, looking up a signature
without type will fail. Consider using ClassMapping.getFieldMapping(String)
or ClassMapping.computeFieldMapping(FieldSignature).
getFieldMapping in interface ClassMapping<M extends ClassMapping,P>signature - The signature of the fieldOptionalClassMapping.getFieldMapping(String),
ClassMapping.computeFieldMapping(FieldSignature)public Optional<FieldMapping> getFieldMapping(String obfuscatedName)
ClassMappingNote: This is not equivalent
to calling ClassMapping.getFieldMapping(FieldSignature) with a
null field type. Use ClassMapping.computeFieldMapping(FieldSignature)
to flexibly lookup field signatures with or without type.
getFieldMapping in interface ClassMapping<M extends ClassMapping,P>obfuscatedName - The obfuscated name of the field mappingOptionalClassMapping.getFieldMapping(FieldSignature),
ClassMapping.computeFieldMapping(FieldSignature)public Optional<FieldMapping> computeFieldMapping(org.cadixdev.bombe.type.signature.FieldSignature signature)
ClassMappingClassMapping.getFieldMapping(FieldSignature) this method
will attempt to match the field signature with or without type:
If FieldSignature.getType() is empty,
ClassMapping.getFieldMapping(String) is returned.
Otherwise, the signature is looked up with type. If that fails, the
signature is looked up again without type. Note that it will insert
a new FieldMapping with the specified type for caching purposes.
computeFieldMapping in interface ClassMapping<M extends ClassMapping,P>signature - The (obfuscated) signature of the fieldOptionalClassMapping.getFieldMapping(FieldSignature),
ClassMapping.getFieldMapping(String)public FieldMapping createFieldMapping(org.cadixdev.bombe.type.signature.FieldSignature signature, String deobfuscatedName)
ClassMappingcreateFieldMapping in interface ClassMapping<M extends ClassMapping,P>signature - The signature of the fielddeobfuscatedName - The de-obfuscated name of the fieldpublic boolean hasFieldMapping(org.cadixdev.bombe.type.signature.FieldSignature signature)
ClassMappinghasFieldMapping in interface ClassMapping<M extends ClassMapping,P>signature - The signature of the field mappingtrue should a field mapping of the given
signature exists in the class mapping;
false otherwisepublic boolean hasFieldMapping(String obfuscatedName)
ClassMappinghasFieldMapping in interface ClassMapping<M extends ClassMapping,P>obfuscatedName - The obfuscated name of the field mappingtrue should a field mapping of the given
obfuscated name exists in the class mapping;
false otherwisepublic Collection<MethodMapping> getMethodMappings()
ClassMappinggetMethodMappings in interface ClassMapping<M extends ClassMapping,P>public Optional<MethodMapping> getMethodMapping(org.cadixdev.bombe.type.signature.MethodSignature signature)
ClassMappinggetMethodMapping in interface ClassMapping<M extends ClassMapping,P>signature - The signature of the method mappingOptionalpublic MethodMapping createMethodMapping(org.cadixdev.bombe.type.signature.MethodSignature signature, String deobfuscatedName)
ClassMappingcreateMethodMapping in interface ClassMapping<M extends ClassMapping,P>signature - The method signaturedeobfuscatedName - The de-obfuscated name of the methodpublic boolean hasMethodMapping(org.cadixdev.bombe.type.signature.MethodSignature signature)
ClassMappinghasMethodMapping in interface ClassMapping<M extends ClassMapping,P>signature - The signature of the method mappingtrue should a method mapping of the given
obfuscated name exist in the class mapping;
false otherwisepublic Collection<InnerClassMapping> getInnerClassMappings()
ClassMappinggetInnerClassMappings in interface ClassMapping<M extends ClassMapping,P>public Optional<InnerClassMapping> getInnerClassMapping(String obfuscatedName)
ClassMappinggetInnerClassMapping in interface ClassMapping<M extends ClassMapping,P>obfuscatedName - The obfuscated name of the inner class mappingOptionalpublic InnerClassMapping createInnerClassMapping(String obfuscatedName, String deobfuscatedName)
ClassMappingcreateInnerClassMapping in interface ClassMapping<M extends ClassMapping,P>obfuscatedName - The obfuscated class namedeobfuscatedName - The de-obfuscated class namepublic boolean hasInnerClassMapping(String obfuscatedName)
ClassMappinghasInnerClassMapping in interface ClassMapping<M extends ClassMapping,P>obfuscatedName - The obfuscated name of the inner class
mappingtrue should a inner class mapping of the
given obfuscated name exist in the class mapping;
false otherwiseprotected StringJoiner buildToString()
buildToString in class AbstractMappingImpl<M extends ClassMapping,P>public boolean equals(Object obj)
equals in class AbstractMappingImpl<M extends ClassMapping,P>public int hashCode()
hashCode in class AbstractMappingImpl<M extends ClassMapping,P>public boolean isComplete()
isComplete in interface org.cadixdev.bombe.analysis.InheritanceCompletablepublic void complete(org.cadixdev.bombe.analysis.InheritanceProvider provider,
org.cadixdev.bombe.analysis.InheritanceProvider.ClassInfo info)
complete in interface org.cadixdev.bombe.analysis.InheritanceCompletable