
org.jtwig.reflection.model.java.JavaMethods Maven / Gradle / Ivy
package org.jtwig.reflection.model.java;
import com.google.common.base.Optional;
import java.util.Collection;
import java.util.Map;
public class JavaMethods {
private final Map methods;
public JavaMethods(Map methods) {
this.methods = methods;
}
public Collection getMethods() {
return methods.values();
}
public Optional getMethod(Class... types) {
return Optional.fromNullable(methods.get(MethodSignature.create(types)));
}
public void merge(JavaMethods origin) {
for (Map.Entry entry : origin.methods.entrySet()) {
if (!methods.containsKey(entry.getKey())) {
methods.put(entry.getKey(), entry.getValue());
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy