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

46 lines
1.4 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 HyphenBuilder implements Style {
@Override // org.simpleframework.xml.stream.Style
public String getAttribute(String str) {
if (str != null) {
return new Parser(str).process();
}
return null;
}
@Override // org.simpleframework.xml.stream.Style
public String getElement(String str) {
if (str != null) {
return new Parser(str).process();
}
return null;
}
/* loaded from: classes6.dex */
class Parser extends Splitter {
final HyphenBuilder this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private Parser(HyphenBuilder hyphenBuilder, String str) {
super(str);
this.this$0 = hyphenBuilder;
}
@Override // org.simpleframework.xml.stream.Splitter
protected void parse(char[] cArr, int i, int i2) {
cArr[i] = toLower(cArr[i]);
}
@Override // org.simpleframework.xml.stream.Splitter
protected void commit(char[] cArr, int i, int i2) {
this.builder.append(cArr, i, i2);
if (i + i2 < this.count) {
this.builder.append('-');
}
}
}
}