MCPcopy Create free account
hub / github.com/Syncleus/aparapi / getProperty

Method getProperty

src/main/java/com/aparapi/Kernel.java:3808–3815  ·  view source on GitHub ↗
(ValueCache<Class<?>, Map<String, V>, T> cache,
         MethodReferenceEntry methodReferenceEntry, V defaultValue)

Source from the content-addressed store, hash-verified

3806 }
3807
3808 private static <V, T extends Throwable> V getProperty(ValueCache<Class<?>, Map<String, V>, T> cache,
3809 MethodReferenceEntry methodReferenceEntry, V defaultValue) throws T {
3810 Map<String, V> map = cache.computeIfAbsent(methodReferenceEntry.getOwnerClassModel().getClassWeAreModelling());
3811 String key = toSignature(methodReferenceEntry);
3812 if (map.containsKey(key))
3813 return map.get(key);
3814 return defaultValue;
3815 }
3816
3817 private static String toSignature(MethodReferenceEntry methodReferenceEntry) {
3818 NameAndTypeEntry nameAndTypeEntry = methodReferenceEntry.getNameAndTypeEntry();

Callers 5

getMappedMethodNameMethod · 0.95
usesAtomic32Method · 0.95
getBooleanMethod · 0.95
testMethod · 0.80
ConfigClass · 0.80

Calls 5

toSignatureMethod · 0.95
computeIfAbsentMethod · 0.80
getMethod · 0.65
getOwnerClassModelMethod · 0.45

Tested by 1

testMethod · 0.64