Skip to content

Commit f1ca29a

Browse files
Add more stubs
1 parent 096509b commit f1ca29a

22 files changed

+186
-152
lines changed
Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
1-
/*
2-
* Copyright (C) 2007 The Guava Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5-
* in compliance with the License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License
10-
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11-
* or implied. See the License for the specific language governing permissions and limitations under
12-
* the License.
13-
*/
1+
// Generated automatically from com.google.common.base.Predicate for testing purposes, and adjusted manually.
142

153
package com.google.common.base;
16-
import org.checkerframework.checker.nullness.qual.Nullable;
17-
18-
public interface Predicate<T> extends java.util.function.Predicate<T> {
19-
boolean apply(@Nullable T input);
20-
21-
@Override
22-
boolean equals(@Nullable Object object);
23-
24-
@Override
25-
default boolean test(@Nullable T input) {
26-
return false;
27-
}
284

5+
public interface Predicate<T> extends java.util.function.Predicate<T>
6+
{
7+
boolean apply(T p0);
8+
boolean equals(Object p0);
9+
default boolean test(T p0){ return false; }
2910
}
Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
/*
2-
* Copyright (C) 2007 The Guava Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5-
* in compliance with the License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License
10-
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11-
* or implied. See the License for the specific language governing permissions and limitations under
12-
* the License.
13-
*/
1+
// Generated automatically from com.google.common.base.Supplier for testing purposes, and adjusted manually
142

153
package com.google.common.base;
164

17-
public interface Supplier<T> extends java.util.function.Supplier<T> {
18-
@Override
19-
T get();
20-
5+
public interface Supplier<T> extends java.util.function.Supplier<T>
6+
{
7+
T get();
218
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Generated automatically from com.google.common.base.Ticker for testing purposes
2+
3+
package com.google.common.base;
4+
5+
6+
abstract public class Ticker
7+
{
8+
protected Ticker(){}
9+
public abstract long read();
10+
public static Ticker systemTicker(){ return null; }
11+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Generated automatically from com.google.common.cache.AbstractCache for testing purposes
2+
3+
package com.google.common.cache;
4+
5+
import com.google.common.cache.Cache;
6+
import com.google.common.cache.CacheStats;
7+
import com.google.common.collect.ImmutableMap;
8+
import java.util.Map;
9+
import java.util.concurrent.Callable;
10+
import java.util.concurrent.ConcurrentMap;
11+
12+
abstract public class AbstractCache<K, V> implements Cache<K, V>
13+
{
14+
protected AbstractCache(){}
15+
public CacheStats stats(){ return null; }
16+
public ConcurrentMap<K, V> asMap(){ return null; }
17+
public ImmutableMap<K, V> getAllPresent(Iterable<? extends Object> p0){ return null; }
18+
public V get(K p0, Callable<? extends V> p1){ return null; }
19+
public long size(){ return 0; }
20+
public void cleanUp(){}
21+
public void invalidate(Object p0){}
22+
public void invalidateAll(){}
23+
public void invalidateAll(Iterable<? extends Object> p0){}
24+
public void put(K p0, V p1){}
25+
public void putAll(Map<? extends K, ? extends V> p0){}
26+
static public interface StatsCounter
27+
{
28+
CacheStats snapshot();
29+
void recordEviction();
30+
void recordHits(int p0);
31+
void recordLoadException(long p0);
32+
void recordLoadSuccess(long p0);
33+
void recordMisses(int p0);
34+
}
35+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Generated automatically from com.google.common.cache.CacheBuilder for testing purposes
2+
3+
package com.google.common.cache;
4+
5+
import com.google.common.base.Ticker;
6+
import com.google.common.cache.Cache;
7+
import com.google.common.cache.CacheBuilderSpec;
8+
import com.google.common.cache.CacheLoader;
9+
import com.google.common.cache.LoadingCache;
10+
import com.google.common.cache.RemovalListener;
11+
import com.google.common.cache.Weigher;
12+
import java.time.Duration;
13+
import java.util.concurrent.TimeUnit;
14+
15+
public class CacheBuilder<K, V>
16+
{
17+
protected CacheBuilder() {}
18+
public <K1 extends K, V1 extends V> Cache<K1, V1> build(){ return null; }
19+
public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> removalListener(RemovalListener<? super K1, ? super V1> p0){ return null; }
20+
public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> weigher(Weigher<? super K1, ? super V1> p0){ return null; }
21+
public <K1 extends K, V1 extends V> LoadingCache<K1, V1> build(CacheLoader<? super K1, V1> p0){ return null; }
22+
public CacheBuilder<K, V> concurrencyLevel(int p0){ return null; }
23+
public CacheBuilder<K, V> expireAfterAccess(Duration p0){ return null; }
24+
public CacheBuilder<K, V> expireAfterAccess(long p0, TimeUnit p1){ return null; }
25+
public CacheBuilder<K, V> expireAfterWrite(Duration p0){ return null; }
26+
public CacheBuilder<K, V> expireAfterWrite(long p0, TimeUnit p1){ return null; }
27+
public CacheBuilder<K, V> initialCapacity(int p0){ return null; }
28+
public CacheBuilder<K, V> maximumSize(long p0){ return null; }
29+
public CacheBuilder<K, V> maximumWeight(long p0){ return null; }
30+
public CacheBuilder<K, V> recordStats(){ return null; }
31+
public CacheBuilder<K, V> refreshAfterWrite(Duration p0){ return null; }
32+
public CacheBuilder<K, V> refreshAfterWrite(long p0, TimeUnit p1){ return null; }
33+
public CacheBuilder<K, V> softValues(){ return null; }
34+
public CacheBuilder<K, V> ticker(Ticker p0){ return null; }
35+
public CacheBuilder<K, V> weakKeys(){ return null; }
36+
public CacheBuilder<K, V> weakValues(){ return null; }
37+
public String toString(){ return null; }
38+
public static CacheBuilder<Object, Object> from(CacheBuilderSpec p0){ return null; }
39+
public static CacheBuilder<Object, Object> from(String p0){ return null; }
40+
public static CacheBuilder<Object, Object> newBuilder(){ return null; }
41+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Generated automatically from com.google.common.cache.CacheBuilderSpec for testing purposes
2+
3+
package com.google.common.cache;
4+
5+
6+
public class CacheBuilderSpec
7+
{
8+
protected CacheBuilderSpec() {}
9+
public String toParsableString(){ return null; }
10+
public String toString(){ return null; }
11+
public boolean equals(Object p0){ return false; }
12+
public int hashCode(){ return 0; }
13+
public static CacheBuilderSpec disableCaching(){ return null; }
14+
public static CacheBuilderSpec parse(String p0){ return null; }
15+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Generated automatically from com.google.common.cache.CacheLoader for testing purposes
2+
3+
package com.google.common.cache;
4+
5+
import com.google.common.base.Function;
6+
import com.google.common.base.Supplier;
7+
import com.google.common.util.concurrent.ListenableFuture;
8+
import java.util.Map;
9+
import java.util.concurrent.Executor;
10+
11+
abstract public class CacheLoader<K, V>
12+
{
13+
protected CacheLoader(){}
14+
public ListenableFuture<V> reload(K p0, V p1){ return null; }
15+
public Map<K, V> loadAll(Iterable<? extends K> p0){ return null; }
16+
public abstract V load(K p0);
17+
public static <K, V> CacheLoader<K, V> asyncReloading(CacheLoader<K, V> p0, Executor p1){ return null; }
18+
public static <K, V> CacheLoader<K, V> from(Function<K, V> p0){ return null; }
19+
public static <V> CacheLoader<Object, V> from(Supplier<V> p0){ return null; }
20+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Generated automatically from com.google.common.cache.RemovalCause for testing purposes, and adjusted manually
2+
3+
package com.google.common.cache;
4+
5+
6+
public enum RemovalCause
7+
{
8+
COLLECTED, EXPIRED, EXPLICIT, REPLACED, SIZE;
9+
private RemovalCause() {}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Generated automatically from com.google.common.cache.RemovalListener for testing purposes
2+
3+
package com.google.common.cache;
4+
5+
import com.google.common.cache.RemovalNotification;
6+
7+
public interface RemovalListener<K, V>
8+
{
9+
void onRemoval(RemovalNotification<K, V> p0);
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Generated automatically from com.google.common.cache.RemovalNotification for testing purposes, and adjusted manually
2+
3+
package com.google.common.cache;
4+
5+
import com.google.common.cache.RemovalCause;
6+
import java.util.AbstractMap;
7+
8+
public class RemovalNotification<K, V> extends AbstractMap.SimpleImmutableEntry<K, V>
9+
{
10+
protected RemovalNotification(K k, V v) { super(k,v); }
11+
public RemovalCause getCause(){ return null; }
12+
public boolean wasEvicted(){ return false; }
13+
public static <K, V> RemovalNotification<K, V> create(K p0, V p1, RemovalCause p2){ return null; }
14+
}

0 commit comments

Comments
 (0)