本文整理汇总了Java中org.jf.dexlib2.writer.pool.ProtoPool.Key类的典型用法代码示例。如果您正苦于以下问题:Java Key类的具体用法?Java Key怎么用?Java Key使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Key类属于org.jf.dexlib2.writer.pool.ProtoPool包,在下文中一共展示了Key类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: intern
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
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());
}
}
示例2: equals
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@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;
}
示例3: equals
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@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;
}
示例4: getShorty
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@Nonnull @Override public CharSequence getShorty(@Nonnull Key key) {
return key.getShorty();
}
示例5: getReturnType
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@Nonnull @Override public CharSequence getReturnType(@Nonnull Key key) {
return key.getReturnType();
}
示例6: getParameters
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@Nullable @Override public TypeListPool.Key<List<? extends CharSequence>> getParameters(@Nonnull Key key) {
return new TypeListPool.Key<List<? extends CharSequence>>(key.getParameters());
}
示例7: Key
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
public Key(@Nonnull MethodReference method) {
this.method = method;
}
示例8: compareTo
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@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());
}
示例9: getShorty
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@Nonnull
@Override
public CharSequence getShorty(@Nonnull Key key) {
return key.getShorty();
}
示例10: getReturnType
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@Nonnull
@Override
public CharSequence getReturnType(@Nonnull Key key) {
return key.getReturnType();
}
示例11: getParameters
import org.jf.dexlib2.writer.pool.ProtoPool.Key; //导入依赖的package包/类
@Nullable
@Override
public TypeListPool.Key<List<? extends CharSequence>> getParameters(@Nonnull Key key) {
return new TypeListPool.Key<List<? extends CharSequence>>(key.getParameters());
}