From d583f7ccc3aba02f54f3f97d6ca4d48a2fe1f240 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sun, 3 Feb 2013 02:07:23 +0100 Subject: [PATCH] Moving fuzzy reflection "framework" to a seperate package. --- .../comphenix/protocol/reflect/FuzzyReflection.java | 1 + .../reflect/{ => fuzzy}/AbstractFuzzyMatcher.java | 2 +- .../reflect/{ => fuzzy}/AbstractFuzzyMember.java | 2 +- .../reflect/{ => fuzzy}/ExactClassMatcher.java | 2 +- .../reflect/{ => fuzzy}/FuzzyClassContract.java | 4 +++- .../reflect/{ => fuzzy}/FuzzyFieldContract.java | 2 +- .../protocol/reflect/{ => fuzzy}/FuzzyMatchers.java | 2 +- .../reflect/{ => fuzzy}/FuzzyMethodContract.java | 3 ++- .../protocol/reflect/instances/BannedGenerator.java | 4 ++-- .../protocol/utility/MinecraftReflection.java | 10 +++++----- 10 files changed, 18 insertions(+), 14 deletions(-) rename ProtocolLib/src/main/java/com/comphenix/protocol/reflect/{ => fuzzy}/AbstractFuzzyMatcher.java (98%) rename ProtocolLib/src/main/java/com/comphenix/protocol/reflect/{ => fuzzy}/AbstractFuzzyMember.java (99%) rename ProtocolLib/src/main/java/com/comphenix/protocol/reflect/{ => fuzzy}/ExactClassMatcher.java (98%) rename ProtocolLib/src/main/java/com/comphenix/protocol/reflect/{ => fuzzy}/FuzzyClassContract.java (97%) rename ProtocolLib/src/main/java/com/comphenix/protocol/reflect/{ => fuzzy}/FuzzyFieldContract.java (98%) rename ProtocolLib/src/main/java/com/comphenix/protocol/reflect/{ => fuzzy}/FuzzyMatchers.java (98%) rename ProtocolLib/src/main/java/com/comphenix/protocol/reflect/{ => fuzzy}/FuzzyMethodContract.java (99%) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyReflection.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyReflection.java index 07067262..9da145aa 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyReflection.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyReflection.java @@ -27,6 +27,7 @@ import java.util.List; import java.util.Set; import java.util.regex.Pattern; +import com.comphenix.protocol.reflect.fuzzy.AbstractFuzzyMatcher; import com.google.common.collect.Lists; /** diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/AbstractFuzzyMatcher.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMatcher.java similarity index 98% rename from ProtocolLib/src/main/java/com/comphenix/protocol/reflect/AbstractFuzzyMatcher.java rename to ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMatcher.java index 1d4d4e26..a93ea18f 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/AbstractFuzzyMatcher.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMatcher.java @@ -1,4 +1,4 @@ -package com.comphenix.protocol.reflect; +package com.comphenix.protocol.reflect.fuzzy; import com.google.common.primitives.Ints; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/AbstractFuzzyMember.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMember.java similarity index 99% rename from ProtocolLib/src/main/java/com/comphenix/protocol/reflect/AbstractFuzzyMember.java rename to ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMember.java index b0ab4950..4e516b97 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/AbstractFuzzyMember.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMember.java @@ -1,4 +1,4 @@ -package com.comphenix.protocol.reflect; +package com.comphenix.protocol.reflect.fuzzy; import java.lang.reflect.Member; import java.util.regex.Pattern; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/ExactClassMatcher.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/ExactClassMatcher.java similarity index 98% rename from ProtocolLib/src/main/java/com/comphenix/protocol/reflect/ExactClassMatcher.java rename to ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/ExactClassMatcher.java index 51b22d04..1a0f861a 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/ExactClassMatcher.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/ExactClassMatcher.java @@ -1,4 +1,4 @@ -package com.comphenix.protocol.reflect; +package com.comphenix.protocol.reflect.fuzzy; /** * Used to check class equality. diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyClassContract.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyClassContract.java similarity index 97% rename from ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyClassContract.java rename to ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyClassContract.java index d0c81e0f..4d803b1c 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyClassContract.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyClassContract.java @@ -1,10 +1,12 @@ -package com.comphenix.protocol.reflect; +package com.comphenix.protocol.reflect.fuzzy; import java.lang.reflect.Field; import java.util.Collection; import java.util.Collections; import java.util.List; +import com.comphenix.protocol.reflect.FuzzyReflection; +import com.comphenix.protocol.reflect.MethodInfo; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyFieldContract.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyFieldContract.java similarity index 98% rename from ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyFieldContract.java rename to ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyFieldContract.java index 2293a5e8..ca54f581 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyFieldContract.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyFieldContract.java @@ -1,4 +1,4 @@ -package com.comphenix.protocol.reflect; +package com.comphenix.protocol.reflect.fuzzy; import java.lang.reflect.Field; import java.util.regex.Pattern; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyMatchers.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyMatchers.java similarity index 98% rename from ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyMatchers.java rename to ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyMatchers.java index 461c6df6..d8dd70de 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyMatchers.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyMatchers.java @@ -1,4 +1,4 @@ -package com.comphenix.protocol.reflect; +package com.comphenix.protocol.reflect.fuzzy; import java.lang.reflect.Member; import java.util.Set; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyMethodContract.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyMethodContract.java similarity index 99% rename from ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyMethodContract.java rename to ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyMethodContract.java index a53358df..670b6139 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/FuzzyMethodContract.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyMethodContract.java @@ -1,4 +1,4 @@ -package com.comphenix.protocol.reflect; +package com.comphenix.protocol.reflect.fuzzy; import java.util.Collections; import java.util.List; @@ -8,6 +8,7 @@ import javax.annotation.Nonnull; import org.apache.commons.lang.NotImplementedException; +import com.comphenix.protocol.reflect.MethodInfo; import com.google.common.collect.Lists; /** diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/BannedGenerator.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/BannedGenerator.java index 778e4682..b3672c60 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/BannedGenerator.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/BannedGenerator.java @@ -2,8 +2,8 @@ package com.comphenix.protocol.reflect.instances; import javax.annotation.Nullable; -import com.comphenix.protocol.reflect.AbstractFuzzyMatcher; -import com.comphenix.protocol.reflect.FuzzyMatchers; +import com.comphenix.protocol.reflect.fuzzy.AbstractFuzzyMatcher; +import com.comphenix.protocol.reflect.fuzzy.FuzzyMatchers; /** * Generator that ensures certain types will never be created. diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java index 709d7e9c..cd18d71d 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftReflection.java @@ -38,12 +38,12 @@ import org.bukkit.Server; import org.bukkit.inventory.ItemStack; import com.comphenix.protocol.injector.BukkitUnwrapper; -import com.comphenix.protocol.reflect.AbstractFuzzyMatcher; -import com.comphenix.protocol.reflect.FuzzyClassContract; -import com.comphenix.protocol.reflect.FuzzyMatchers; -import com.comphenix.protocol.reflect.FuzzyFieldContract; -import com.comphenix.protocol.reflect.FuzzyMethodContract; import com.comphenix.protocol.reflect.FuzzyReflection; +import com.comphenix.protocol.reflect.fuzzy.AbstractFuzzyMatcher; +import com.comphenix.protocol.reflect.fuzzy.FuzzyClassContract; +import com.comphenix.protocol.reflect.fuzzy.FuzzyFieldContract; +import com.comphenix.protocol.reflect.fuzzy.FuzzyMatchers; +import com.comphenix.protocol.reflect.fuzzy.FuzzyMethodContract; import com.comphenix.protocol.wrappers.WrappedDataWatcher; import com.google.common.base.Joiner;