DateTimeFormatterBuilder$MatchingParser.smali
.class Lorg/joda/time/format/DateTimeFormatterBuilder$MatchingParser;
.super Ljava/lang/Object;
.source "DateTimeFormatterBuilder.java"
# interfaces
.implements Lorg/joda/time/format/InternalParser;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/joda/time/format/DateTimeFormatterBuilder;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "MatchingParser"
.end annotation
# instance fields
.field private final iParsedLengthEstimate:I
.field private final iParsers:[Lorg/joda/time/format/InternalParser;
# direct methods
.method constructor <init>([Lorg/joda/time/format/InternalParser;)V
.registers 5
.line 2569
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2570
iput-object p1, p0, Lorg/joda/time/format/DateTimeFormatterBuilder$MatchingParser;->iParsers:[Lorg/joda/time/format/InternalParser;
.line 2572
array-length v0, p1
const/4 v1, 0x0
:cond_7
:goto_7
add-int/lit8 v0, v0, -0x1
if-ltz v0, :cond_17
.line 2573
aget-object v2, p1, v0
if-eqz v2, :cond_7
.line 2575
invoke-interface {v2}, Lorg/joda/time/format/InternalParser;->estimateParsedLength()I
move-result v2
if-le v2, v1, :cond_7
move v1, v2
goto :goto_7
.line 2581
:cond_17
iput v1, p0, Lorg/joda/time/format/DateTimeFormatterBuilder$MatchingParser;->iParsedLengthEstimate:I
return-void
.end method
# virtual methods
.method public estimateParsedLength()I
.registers 2
.line 2585
iget v0, p0, Lorg/joda/time/format/DateTimeFormatterBuilder$MatchingParser;->iParsedLengthEstimate:I
return v0
.end method
.method public parseInto(Lorg/joda/time/format/DateTimeParserBucket;Ljava/lang/CharSequence;I)I
.registers 13
.line 2589
iget-object v0, p0, Lorg/joda/time/format/DateTimeFormatterBuilder$MatchingParser;->iParsers:[Lorg/joda/time/format/InternalParser;
.line 2590
array-length v1, v0
.line 2592
invoke-virtual {p1}, Lorg/joda/time/format/DateTimeParserBucket;->saveState()Ljava/lang/Object;
move-result-object v2
const/4 v3, 0x0
const/4 v4, 0x0
move v6, p3
move v7, v6
const/4 v5, 0x0
:goto_c
if-ge v5, v1, :cond_41
.line 2601
aget-object v8, v0, v5
if-nez v8, :cond_17
if-gt v6, p3, :cond_15
return p3
:cond_15
const/4 v3, 0x1
goto :goto_41
.line 2610
:cond_17
invoke-interface {v8, p1, p2, p3}, Lorg/joda/time/format/InternalParser;->parseInto(Lorg/joda/time/format/DateTimeParserBucket;Ljava/lang/CharSequence;I)I
move-result v8
if-lt v8, p3, :cond_35
if-le v8, v6, :cond_3b
.line 2613
invoke-interface {p2}, Ljava/lang/CharSequence;->length()I
move-result v4
if-ge v8, v4, :cond_34
add-int/lit8 v4, v5, 0x1
if-ge v4, v1, :cond_34
aget-object v4, v0, v4
if-nez v4, :cond_2e
goto :goto_34
.line 2621
:cond_2e
invoke-virtual {p1}, Lorg/joda/time/format/DateTimeParserBucket;->saveState()Ljava/lang/Object;
move-result-object v4
move v6, v8
goto :goto_3b
:cond_34
:goto_34
return v8
:cond_35
if-gez v8, :cond_3b
not-int v8, v8
if-le v8, v7, :cond_3b
move v7, v8
.line 2631
:cond_3b
:goto_3b
invoke-virtual {p1, v2}, Lorg/joda/time/format/DateTimeParserBucket;->restoreState(Ljava/lang/Object;)Z
add-int/lit8 v5, v5, 0x1
goto :goto_c
:cond_41
:goto_41
if-gt v6, p3, :cond_4a
if-ne v6, p3, :cond_48
if-eqz v3, :cond_48
goto :goto_4a
:cond_48
not-int p1, v7
return p1
:cond_4a
:goto_4a
if-eqz v4, :cond_4f
.line 2637
invoke-virtual {p1, v4}, Lorg/joda/time/format/DateTimeParserBucket;->restoreState(Ljava/lang/Object;)Z
:cond_4f
return v6
.end method