373 lines
		
	
	
		
			9.7 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			373 lines
		
	
	
		
			9.7 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lcom/thoughtworks/xstream/io/xml/XppReader;
 | |
| .super Lcom/thoughtworks/xstream/io/xml/AbstractPullReader;
 | |
| .source "XppReader.java"
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private final parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
| .field private final reader:Ljava/io/Reader;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Ljava/io/Reader;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 8
 | |
|     new-instance v0, Lcom/thoughtworks/xstream/io/xml/XmlFriendlyReplacer;
 | |
| 
 | |
|     invoke-direct {v0}, Lcom/thoughtworks/xstream/io/xml/XmlFriendlyReplacer;-><init>()V
 | |
| 
 | |
|     invoke-direct {p0, p1, v0}, Lcom/thoughtworks/xstream/io/xml/XppReader;-><init>(Ljava/io/Reader;Lcom/thoughtworks/xstream/io/xml/XmlFriendlyReplacer;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Ljava/io/Reader;Lcom/thoughtworks/xstream/io/xml/XmlFriendlyReplacer;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 9
 | |
|     invoke-direct {p0, p2}, Lcom/thoughtworks/xstream/io/xml/AbstractPullReader;-><init>(Lcom/thoughtworks/xstream/io/xml/XmlFriendlyReplacer;)V
 | |
| 
 | |
|     .line 10
 | |
|     :try_start_0
 | |
|     invoke-virtual {p0}, Lcom/thoughtworks/xstream/io/xml/XppReader;->createParser()Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     iput-object p2, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     .line 11
 | |
|     iput-object p1, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->reader:Ljava/io/Reader;
 | |
| 
 | |
|     .line 12
 | |
|     invoke-interface {p2, p1}, Lorg/xmlpull/v1/XmlPullParser;->setInput(Ljava/io/Reader;)V
 | |
| 
 | |
|     .line 13
 | |
|     invoke-virtual {p0}, Lcom/thoughtworks/xstream/io/xml/AbstractPullReader;->moveDown()V
 | |
|     :try_end_0
 | |
|     .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception p1
 | |
| 
 | |
|     .line 14
 | |
|     new-instance p2, Lcom/thoughtworks/xstream/io/StreamException;
 | |
| 
 | |
|     invoke-direct {p2, p1}, Lcom/thoughtworks/xstream/io/StreamException;-><init>(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw p2
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Ljava/io/Reader;Lorg/xmlpull/v1/XmlPullParser;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Lcom/thoughtworks/xstream/io/xml/XmlFriendlyNameCoder;
 | |
| 
 | |
|     invoke-direct {v0}, Lcom/thoughtworks/xstream/io/xml/XmlFriendlyNameCoder;-><init>()V
 | |
| 
 | |
|     invoke-direct {p0, p1, p2, v0}, Lcom/thoughtworks/xstream/io/xml/XppReader;-><init>(Ljava/io/Reader;Lorg/xmlpull/v1/XmlPullParser;Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Ljava/io/Reader;Lorg/xmlpull/v1/XmlPullParser;Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-direct {p0, p3}, Lcom/thoughtworks/xstream/io/xml/AbstractPullReader;-><init>(Lcom/thoughtworks/xstream/io/naming/NameCoder;)V
 | |
| 
 | |
|     .line 3
 | |
|     iput-object p2, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     .line 4
 | |
|     iput-object p1, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->reader:Ljava/io/Reader;
 | |
| 
 | |
|     .line 5
 | |
|     :try_start_0
 | |
|     invoke-interface {p2, p1}, Lorg/xmlpull/v1/XmlPullParser;->setInput(Ljava/io/Reader;)V
 | |
|     :try_end_0
 | |
|     .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {p0}, Lcom/thoughtworks/xstream/io/xml/AbstractPullReader;->moveDown()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception p1
 | |
| 
 | |
|     .line 7
 | |
|     new-instance p2, Lcom/thoughtworks/xstream/io/StreamException;
 | |
| 
 | |
|     invoke-direct {p2, p1}, Lcom/thoughtworks/xstream/io/StreamException;-><init>(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw p2
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public appendErrors(Lcom/thoughtworks/xstream/converters/ErrorWriter;)V
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-interface {v0}, Lorg/xmlpull/v1/XmlPullParser;->getLineNumber()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const-string v1, "line number"
 | |
| 
 | |
|     invoke-interface {p1, v1, v0}, Lcom/thoughtworks/xstream/converters/ErrorWriter;->add(Ljava/lang/String;Ljava/lang/String;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public close()V
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->reader:Ljava/io/Reader;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/io/Reader;->close()V
 | |
|     :try_end_0
 | |
|     .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception v0
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v1, Lcom/thoughtworks/xstream/io/StreamException;
 | |
| 
 | |
|     invoke-direct {v1, v0}, Lcom/thoughtworks/xstream/io/StreamException;-><init>(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v1
 | |
| .end method
 | |
| 
 | |
| .method public createParser()Lorg/xmlpull/v1/XmlPullParser;
 | |
|     .locals 3
 | |
| 
 | |
|     :try_start_0
 | |
|     const-string v0, "org.xmlpull.mxp1.MXParser"
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     .line 1
 | |
|     const-class v2, Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-virtual {v2}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     invoke-static {v0, v1, v2}, Ljava/lang/Class;->forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Lorg/xmlpull/v1/XmlPullParser;
 | |
|     :try_end_0
 | |
|     .catch Ljava/lang/InstantiationException; {:try_start_0 .. :try_end_0} :catch_2
 | |
|     .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
 | |
|     .catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     return-object v0
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception v0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :catch_1
 | |
|     move-exception v0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :catch_2
 | |
|     move-exception v0
 | |
| 
 | |
|     .line 2
 | |
|     :goto_0
 | |
|     new-instance v1, Lcom/thoughtworks/xstream/io/StreamException;
 | |
| 
 | |
|     const-string v2, "Cannot create Xpp3 parser instance."
 | |
| 
 | |
|     invoke-direct {v1, v2, v0}, Lcom/thoughtworks/xstream/io/StreamException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v1
 | |
| .end method
 | |
| 
 | |
| .method public getAttribute(I)Ljava/lang/String;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-interface {v0, p1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public getAttribute(Ljava/lang/String;)Ljava/lang/String;
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-virtual {p0, p1}, Lcom/thoughtworks/xstream/io/AbstractReader;->encodeAttribute(Ljava/lang/String;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     invoke-interface {v0, v1, p1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public getAttributeCount()I
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-interface {v0}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeCount()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public getAttributeName(I)Ljava/lang/String;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-interface {v0, p1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeName(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-virtual {p0, p1}, Lcom/thoughtworks/xstream/io/AbstractReader;->decodeAttribute(Ljava/lang/String;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public pullElementName()Ljava/lang/String;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-interface {v0}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public pullNextEvent()I
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-interface {v0}, Lorg/xmlpull/v1/XmlPullParser;->next()I
 | |
| 
 | |
|     move-result v0
 | |
|     :try_end_0
 | |
|     .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_1
 | |
|     .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     if-eqz v0, :cond_3
 | |
| 
 | |
|     const/4 v2, 0x2
 | |
| 
 | |
|     if-eq v0, v1, :cond_2
 | |
| 
 | |
|     if-eq v0, v2, :cond_3
 | |
| 
 | |
|     const/4 v1, 0x3
 | |
| 
 | |
|     if-eq v0, v1, :cond_2
 | |
| 
 | |
|     const/4 v2, 0x4
 | |
| 
 | |
|     if-eq v0, v2, :cond_1
 | |
| 
 | |
|     const/16 v1, 0x9
 | |
| 
 | |
|     if-eq v0, v1, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     return v0
 | |
| 
 | |
|     :cond_0
 | |
|     return v2
 | |
| 
 | |
|     :cond_1
 | |
|     return v1
 | |
| 
 | |
|     :cond_2
 | |
|     return v2
 | |
| 
 | |
|     :cond_3
 | |
|     return v1
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception v0
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v1, Lcom/thoughtworks/xstream/io/StreamException;
 | |
| 
 | |
|     invoke-direct {v1, v0}, Lcom/thoughtworks/xstream/io/StreamException;-><init>(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v1
 | |
| 
 | |
|     :catch_1
 | |
|     move-exception v0
 | |
| 
 | |
|     .line 3
 | |
|     new-instance v1, Lcom/thoughtworks/xstream/io/StreamException;
 | |
| 
 | |
|     invoke-direct {v1, v0}, Lcom/thoughtworks/xstream/io/StreamException;-><init>(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v1
 | |
| .end method
 | |
| 
 | |
| .method public pullText()Ljava/lang/String;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/thoughtworks/xstream/io/xml/XppReader;->parser:Lorg/xmlpull/v1/XmlPullParser;
 | |
| 
 | |
|     invoke-interface {v0}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 |