mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Fix binding order
This commit is contained in:
@ -115,21 +115,26 @@ public class BindingMap implements Binding {
|
||||
*/
|
||||
private BoundMethod match(ParameterData pd) {
|
||||
Type type = pd.getType();
|
||||
BoundMethod result = null;
|
||||
while (type != null) {
|
||||
List<BoundMethod> methods = bindings.get(type);
|
||||
if (methods != null) {
|
||||
for (BoundMethod binding : methods) {
|
||||
if (binding.classifier != null) {
|
||||
if (pd.getClassifier() != null && pd.getClassifier().annotationType().equals(binding.classifier)) {
|
||||
if (binding.type == null || binding.type.equals(type)) {
|
||||
if (binding.type == null) {
|
||||
result = binding;
|
||||
} else if (binding.type.equals(type)) {
|
||||
return binding;
|
||||
}
|
||||
|
||||
}
|
||||
} else if (binding.type.equals(type)) {
|
||||
return binding;
|
||||
if (result == null) result = binding;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result != null) return result;
|
||||
type = (type instanceof Class) ? ((Class) type).getSuperclass() : null;
|
||||
}
|
||||
throw new RuntimeException("Unknown type " + pd.getType());
|
||||
|
Reference in New Issue
Block a user