Parameter.java
3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
package com.google.common.reflect;
import com.google.common.annotations.Beta;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.util.Iterator;
import javax.annotation.Nullable;
@Beta
public final class Parameter
implements AnnotatedElement
{
private final Invokable<?, ?> a;
private final int b;
private final TypeToken<?> c;
private final ImmutableList<Annotation> d;
Parameter(Invokable<?, ?> paramInvokable, int paramInt, TypeToken<?> paramTypeToken, Annotation[] paramArrayOfAnnotation)
{
this.a = paramInvokable;
this.b = paramInt;
this.c = paramTypeToken;
this.d = ImmutableList.copyOf(paramArrayOfAnnotation);
}
public final boolean equals(@Nullable Object paramObject)
{
boolean bool2 = false;
boolean bool1 = bool2;
if ((paramObject instanceof Parameter))
{
paramObject = (Parameter)paramObject;
bool1 = bool2;
if (this.b == ((Parameter)paramObject).b)
{
bool1 = bool2;
if (this.a.equals(((Parameter)paramObject).a)) {
bool1 = true;
}
}
}
return bool1;
}
@Nullable
public final <A extends Annotation> A getAnnotation(Class<A> paramClass)
{
Preconditions.checkNotNull(paramClass);
Iterator localIterator = this.d.iterator();
while (localIterator.hasNext())
{
Annotation localAnnotation = (Annotation)localIterator.next();
if (paramClass.isInstance(localAnnotation)) {
return (Annotation)paramClass.cast(localAnnotation);
}
}
return null;
}
public final Annotation[] getAnnotations()
{
return getDeclaredAnnotations();
}
public final <A extends Annotation> A[] getAnnotationsByType(Class<A> paramClass)
{
return getDeclaredAnnotationsByType(paramClass);
}
@Nullable
public final <A extends Annotation> A getDeclaredAnnotation(Class<A> paramClass)
{
Preconditions.checkNotNull(paramClass);
return (Annotation)FluentIterable.from(this.d).filter(paramClass).first().orNull();
}
public final Annotation[] getDeclaredAnnotations()
{
return (Annotation[])this.d.toArray(new Annotation[this.d.size()]);
}
public final <A extends Annotation> A[] getDeclaredAnnotationsByType(Class<A> paramClass)
{
return (Annotation[])FluentIterable.from(this.d).filter(paramClass).toArray(paramClass);
}
public final Invokable<?, ?> getDeclaringInvokable()
{
return this.a;
}
public final TypeToken<?> getType()
{
return this.c;
}
public final int hashCode()
{
return this.b;
}
public final boolean isAnnotationPresent(Class<? extends Annotation> paramClass)
{
return getAnnotation(paramClass) != null;
}
public final String toString()
{
String str = String.valueOf(String.valueOf(this.c));
int i = this.b;
return str.length() + 15 + str + " arg" + i;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/reflect/Parameter.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/