org.jf.dexlib2.writer.pool.ProtoPool.Key Java Examples
The following examples show how to use
org.jf.dexlib2.writer.pool.ProtoPool.Key.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 5 votes |
public void intern(@Nonnull MethodReference method) { // We can't use method directly, because it is likely a full MethodReference. We use a wrapper that computes // hashCode and equals based only on the prototype fields Key key = new Key(method); Integer prev = internedItems.put(key, 0); if (prev == null) { stringPool.intern(key.getShorty()); typePool.intern(method.getReturnType()); typeListPool.intern(method.getParameterTypes()); } }
Example #2
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 5 votes |
@Override public boolean equals(@Nullable Object o) { if (o instanceof Key) { Key other = (Key)o; return getReturnType().equals(other.getReturnType()) && CharSequenceUtils.listEquals(getParameters(), other.getParameters()); } return false; }
Example #3
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 5 votes |
@Override public boolean equals(@Nullable Object o) { if (o instanceof Key) { Key other = (Key)o; return getReturnType().equals(other.getReturnType()) && CharSequenceUtils.listEquals(getParameters(), other.getParameters()); } return false; }
Example #4
Source File: ProtoPool.java From zjdroid with Apache License 2.0 | 5 votes |
public void intern(@Nonnull MethodReference method) { // We can't use method directly, because it is likely a full MethodReference. We use a wrapper that computes // hashCode and equals based only on the prototype fields Key key = new Key(method); Integer prev = internedItems.put(key, 0); if (prev == null) { stringPool.intern(key.getShorty()); typePool.intern(method.getReturnType()); typeListPool.intern(method.getParameterTypes()); } }
Example #5
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 5 votes |
public void intern(@Nonnull MethodReference method) { // We can't use method directly, because it is likely a full MethodReference. We use a wrapper that computes // hashCode and equals based only on the prototype fields Key key = new Key(method); Integer prev = internedItems.put(key, 0); if (prev == null) { stringPool.intern(key.getShorty()); typePool.intern(method.getReturnType()); typeListPool.intern(method.getParameterTypes()); } }
Example #6
Source File: ProtoPool.java From HeyGirl with Apache License 2.0 | 5 votes |
@Override public boolean equals(@Nullable Object o) { if (o instanceof Key) { Key other = (Key)o; return getReturnType().equals(other.getReturnType()) && CharSequenceUtils.listEquals(getParameters(), other.getParameters()); } return false; }
Example #7
Source File: ProtoPool.java From zjdroid with Apache License 2.0 | 5 votes |
@Override public boolean equals(@Nullable Object o) { if (o instanceof Key) { Key other = (Key)o; return getReturnType().equals(other.getReturnType()) && CharSequenceUtils.listEquals(getParameters(), other.getParameters()); } return false; }
Example #8
Source File: ProtoPool.java From HeyGirl with Apache License 2.0 | 5 votes |
public void intern(@Nonnull MethodReference method) { // We can't use method directly, because it is likely a full MethodReference. We use a wrapper that computes // hashCode and equals based only on the prototype fields Key key = new Key(method); Integer prev = internedItems.put(key, 0); if (prev == null) { stringPool.intern(key.getShorty()); typePool.intern(method.getReturnType()); typeListPool.intern(method.getParameterTypes()); } }
Example #9
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Override public int compareTo(@Nonnull Key o) { int res = getReturnType().compareTo(o.getReturnType()); if (res != 0) return res; return CollectionUtils.compareAsIterable(Ordering.usingToString(), getParameters(), o.getParameters()); }
Example #10
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
public Key(@Nonnull MethodReference method) { this.method = method; }
Example #11
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Nullable @Override public TypeListPool.Key<List<? extends CharSequence>> getParameters(@Nonnull Key key) { return new TypeListPool.Key<List<? extends CharSequence>>(key.getParameters()); }
Example #12
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Nonnull @Override public CharSequence getReturnType(@Nonnull Key key) { return key.getReturnType(); }
Example #13
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Nonnull @Override public CharSequence getShorty(@Nonnull Key key) { return key.getShorty(); }
Example #14
Source File: ProtoPool.java From HeyGirl with Apache License 2.0 | 4 votes |
@Override public int compareTo(@Nonnull Key o) { int res = getReturnType().compareTo(o.getReturnType()); if (res != 0) return res; return CollectionUtils.compareAsIterable(Ordering.usingToString(), getParameters(), o.getParameters()); }
Example #15
Source File: ProtoPool.java From HeyGirl with Apache License 2.0 | 4 votes |
public Key(@Nonnull MethodReference method) { this.method = method; }
Example #16
Source File: ProtoPool.java From HeyGirl with Apache License 2.0 | 4 votes |
@Nullable @Override public TypeListPool.Key<List<? extends CharSequence>> getParameters(@Nonnull Key key) { return new TypeListPool.Key<List<? extends CharSequence>>(key.getParameters()); }
Example #17
Source File: ProtoPool.java From HeyGirl with Apache License 2.0 | 4 votes |
@Nonnull @Override public CharSequence getReturnType(@Nonnull Key key) { return key.getReturnType(); }
Example #18
Source File: ProtoPool.java From HeyGirl with Apache License 2.0 | 4 votes |
@Nonnull @Override public CharSequence getShorty(@Nonnull Key key) { return key.getShorty(); }
Example #19
Source File: ProtoPool.java From zjdroid with Apache License 2.0 | 4 votes |
@Override public int compareTo(@Nonnull Key o) { int res = getReturnType().compareTo(o.getReturnType()); if (res != 0) return res; return CollectionUtils.compareAsIterable(Ordering.usingToString(), getParameters(), o.getParameters()); }
Example #20
Source File: ProtoPool.java From zjdroid with Apache License 2.0 | 4 votes |
public Key(@Nonnull MethodReference method) { this.method = method; }
Example #21
Source File: ProtoPool.java From zjdroid with Apache License 2.0 | 4 votes |
@Nullable @Override public TypeListPool.Key<List<? extends CharSequence>> getParameters(@Nonnull Key key) { return new TypeListPool.Key<List<? extends CharSequence>>(key.getParameters()); }
Example #22
Source File: ProtoPool.java From zjdroid with Apache License 2.0 | 4 votes |
@Nonnull @Override public CharSequence getReturnType(@Nonnull Key key) { return key.getReturnType(); }
Example #23
Source File: ProtoPool.java From zjdroid with Apache License 2.0 | 4 votes |
@Nonnull @Override public CharSequence getShorty(@Nonnull Key key) { return key.getShorty(); }
Example #24
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Override public int compareTo(@Nonnull Key o) { int res = getReturnType().compareTo(o.getReturnType()); if (res != 0) return res; return CollectionUtils.compareAsIterable(Ordering.usingToString(), getParameters(), o.getParameters()); }
Example #25
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
public Key(@Nonnull MethodReference method) { this.method = method; }
Example #26
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Nullable @Override public TypeListPool.Key<List<? extends CharSequence>> getParameters(@Nonnull Key key) { return new TypeListPool.Key<List<? extends CharSequence>>(key.getParameters()); }
Example #27
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Nonnull @Override public CharSequence getReturnType(@Nonnull Key key) { return key.getReturnType(); }
Example #28
Source File: ProtoPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Nonnull @Override public CharSequence getShorty(@Nonnull Key key) { return key.getShorty(); }