use of org.jf.dexlib2.writer.builder.BuilderEncodedValues.BuilderArrayEncodedValue in project smali by JesusFreke.
the class BuilderEncodedArrayPool method internArrayEncodedValue.
@Nonnull
public BuilderArrayEncodedValue internArrayEncodedValue(@Nonnull ArrayEncodedValue arrayEncodedValue) {
BuilderArrayEncodedValue builderArrayEncodedValue = internedItems.get(arrayEncodedValue);
if (builderArrayEncodedValue != null) {
return builderArrayEncodedValue;
}
builderArrayEncodedValue = (BuilderArrayEncodedValue) dexBuilder.internEncodedValue(arrayEncodedValue);
BuilderArrayEncodedValue previous = internedItems.putIfAbsent(builderArrayEncodedValue, builderArrayEncodedValue);
return previous == null ? builderArrayEncodedValue : previous;
}
use of org.jf.dexlib2.writer.builder.BuilderEncodedValues.BuilderArrayEncodedValue in project smali by JesusFreke.
the class BuilderCallSitePool method internCallSite.
@Nonnull
public BuilderCallSiteReference internCallSite(@Nonnull CallSiteReference callSiteReference) {
BuilderCallSiteReference internedCallSite = internedItems.get(callSiteReference);
if (internedCallSite != null) {
return internedCallSite;
}
BuilderArrayEncodedValue encodedCallSite = dexBuilder.encodedArraySection.internArrayEncodedValue(CallSiteUtil.getEncodedCallSite(callSiteReference));
internedCallSite = new BuilderCallSiteReference(callSiteReference.getName(), encodedCallSite);
BuilderCallSiteReference existing = internedItems.putIfAbsent(internedCallSite, internedCallSite);
return existing == null ? internedCallSite : existing;
}
Aggregations