what-the-bank/sources/org/simpleframework/xml/stream/CamelCaseBuilder.java

75 lines
2.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.simpleframework.xml.stream;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes6.dex */
public class CamelCaseBuilder implements Style {
protected final boolean attribute;
protected final boolean element;
public CamelCaseBuilder(boolean z, boolean z2) {
this.attribute = z2;
this.element = z;
}
@Override // org.simpleframework.xml.stream.Style
public String getAttribute(String str) {
if (str != null) {
return new Attribute(str).process();
}
return null;
}
@Override // org.simpleframework.xml.stream.Style
public String getElement(String str) {
if (str != null) {
return new Element(str).process();
}
return null;
}
/* loaded from: classes6.dex */
class Attribute extends Splitter {
private boolean capital;
final CamelCaseBuilder this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private Attribute(CamelCaseBuilder camelCaseBuilder, String str) {
super(str);
this.this$0 = camelCaseBuilder;
}
@Override // org.simpleframework.xml.stream.Splitter
protected void parse(char[] cArr, int i, int i2) {
if (this.this$0.attribute || this.capital) {
cArr[i] = toUpper(cArr[i]);
}
this.capital = true;
}
@Override // org.simpleframework.xml.stream.Splitter
protected void commit(char[] cArr, int i, int i2) {
this.builder.append(cArr, i, i2);
}
}
/* loaded from: classes6.dex */
class Element extends Attribute {
private boolean capital;
final CamelCaseBuilder this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private Element(CamelCaseBuilder camelCaseBuilder, String str) {
super(str);
this.this$0 = camelCaseBuilder;
}
@Override // org.simpleframework.xml.stream.CamelCaseBuilder.Attribute, org.simpleframework.xml.stream.Splitter
protected void parse(char[] cArr, int i, int i2) {
if (this.this$0.element || this.capital) {
cArr[i] = toUpper(cArr[i]);
}
this.capital = true;
}
}
}