Java Code Examples for org.jf.util.CollectionUtils#lastIndexOf()
The following examples show how to use
org.jf.util.CollectionUtils#lastIndexOf() .
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: ClassPool.java From ZjDroid with Apache License 2.0 | 6 votes |
@Nullable @Override public Collection<? extends EncodedValue> getStaticInitializers( @Nonnull PoolClassDef classDef) { final SortedSet<Field> sortedStaticFields = classDef.getStaticFields(); final int lastIndex = CollectionUtils.lastIndexOf(sortedStaticFields, HAS_INITIALIZER); if (lastIndex > -1) { return new AbstractCollection<EncodedValue>() { @Nonnull @Override public Iterator<EncodedValue> iterator() { return FluentIterable.from(sortedStaticFields) .limit(lastIndex+1) .transform(GET_INITIAL_VALUE).iterator(); } @Override public int size() { return lastIndex+1; } }; } return null; }
Example 2
Source File: BuilderClassPool.java From ZjDroid with Apache License 2.0 | 6 votes |
@Nullable @Override public Collection<? extends BuilderEncodedValue> getStaticInitializers(@Nonnull BuilderClassDef classDef) { final SortedSet<BuilderField> sortedStaticFields = classDef.getStaticFields(); final int lastIndex = CollectionUtils.lastIndexOf(sortedStaticFields, HAS_INITIALIZER); if (lastIndex > -1) { return new AbstractCollection<BuilderEncodedValue>() { @Nonnull @Override public Iterator<BuilderEncodedValue> iterator() { return FluentIterable.from(sortedStaticFields) .limit(lastIndex+1) .transform(GET_INITIAL_VALUE).iterator(); } @Override public int size() { return lastIndex+1; } }; } return null; }
Example 3
Source File: ClassPool.java From zjdroid with Apache License 2.0 | 6 votes |
@Nullable @Override public Collection<? extends EncodedValue> getStaticInitializers( @Nonnull PoolClassDef classDef) { final SortedSet<Field> sortedStaticFields = classDef.getStaticFields(); final int lastIndex = CollectionUtils.lastIndexOf(sortedStaticFields, HAS_INITIALIZER); if (lastIndex > -1) { return new AbstractCollection<EncodedValue>() { @Nonnull @Override public Iterator<EncodedValue> iterator() { return FluentIterable.from(sortedStaticFields) .limit(lastIndex+1) .transform(GET_INITIAL_VALUE).iterator(); } @Override public int size() { return lastIndex+1; } }; } return null; }
Example 4
Source File: BuilderClassPool.java From zjdroid with Apache License 2.0 | 6 votes |
@Nullable @Override public Collection<? extends BuilderEncodedValue> getStaticInitializers(@Nonnull BuilderClassDef classDef) { final SortedSet<BuilderField> sortedStaticFields = classDef.getStaticFields(); final int lastIndex = CollectionUtils.lastIndexOf(sortedStaticFields, HAS_INITIALIZER); if (lastIndex > -1) { return new AbstractCollection<BuilderEncodedValue>() { @Nonnull @Override public Iterator<BuilderEncodedValue> iterator() { return FluentIterable.from(sortedStaticFields) .limit(lastIndex+1) .transform(GET_INITIAL_VALUE).iterator(); } @Override public int size() { return lastIndex+1; } }; } return null; }
Example 5
Source File: ClassPool.java From HeyGirl with Apache License 2.0 | 6 votes |
@Nullable @Override public Collection<? extends EncodedValue> getStaticInitializers( @Nonnull PoolClassDef classDef) { final SortedSet<Field> sortedStaticFields = classDef.getStaticFields(); final int lastIndex = CollectionUtils.lastIndexOf(sortedStaticFields, HAS_INITIALIZER); if (lastIndex > -1) { return new AbstractCollection<EncodedValue>() { @Nonnull @Override public Iterator<EncodedValue> iterator() { return FluentIterable.from(sortedStaticFields) .limit(lastIndex+1) .transform(GET_INITIAL_VALUE).iterator(); } @Override public int size() { return lastIndex+1; } }; } return null; }
Example 6
Source File: BuilderClassPool.java From HeyGirl with Apache License 2.0 | 6 votes |
@Nullable @Override public Collection<? extends BuilderEncodedValue> getStaticInitializers(@Nonnull BuilderClassDef classDef) { final SortedSet<BuilderField> sortedStaticFields = classDef.getStaticFields(); final int lastIndex = CollectionUtils.lastIndexOf(sortedStaticFields, HAS_INITIALIZER); if (lastIndex > -1) { return new AbstractCollection<BuilderEncodedValue>() { @Nonnull @Override public Iterator<BuilderEncodedValue> iterator() { return FluentIterable.from(sortedStaticFields) .limit(lastIndex+1) .transform(GET_INITIAL_VALUE).iterator(); } @Override public int size() { return lastIndex+1; } }; } return null; }
Example 7
Source File: ClassPool.java From ZjDroid with Apache License 2.0 | 6 votes |
@Nullable @Override public Collection<? extends EncodedValue> getStaticInitializers( @Nonnull PoolClassDef classDef) { final SortedSet<Field> sortedStaticFields = classDef.getStaticFields(); final int lastIndex = CollectionUtils.lastIndexOf(sortedStaticFields, HAS_INITIALIZER); if (lastIndex > -1) { return new AbstractCollection<EncodedValue>() { @Nonnull @Override public Iterator<EncodedValue> iterator() { return FluentIterable.from(sortedStaticFields) .limit(lastIndex+1) .transform(GET_INITIAL_VALUE).iterator(); } @Override public int size() { return lastIndex+1; } }; } return null; }
Example 8
Source File: BuilderClassPool.java From ZjDroid with Apache License 2.0 | 6 votes |
@Nullable @Override public Collection<? extends BuilderEncodedValue> getStaticInitializers(@Nonnull BuilderClassDef classDef) { final SortedSet<BuilderField> sortedStaticFields = classDef.getStaticFields(); final int lastIndex = CollectionUtils.lastIndexOf(sortedStaticFields, HAS_INITIALIZER); if (lastIndex > -1) { return new AbstractCollection<BuilderEncodedValue>() { @Nonnull @Override public Iterator<BuilderEncodedValue> iterator() { return FluentIterable.from(sortedStaticFields) .limit(lastIndex+1) .transform(GET_INITIAL_VALUE).iterator(); } @Override public int size() { return lastIndex+1; } }; } return null; }