Last active
December 27, 2015 17:19
-
-
Save rvbiljouw/7361159 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ms.aurora.updater.identifier.sound; | |
import ms.aurora.bal.Context; | |
import ms.aurora.bal.Identifier; | |
import ms.aurora.bal.model.ClassWrapper; | |
import ms.aurora.updater.accessors.sound.Filter; | |
import org.apache.bcel.Constants; | |
import org.apache.bcel.generic.Type; | |
import static com.google.common.base.Predicates.and; | |
import static com.google.common.base.Predicates.not; | |
import static com.google.common.collect.Collections2.filter; | |
import static ms.aurora.bal.util.ClassUtils.hasField; | |
import static ms.aurora.bal.util.ClassUtils.hasFloat; | |
import static ms.aurora.bal.util.Extract.single; | |
import static ms.aurora.bal.util.FieldUtils.fieldAccess; | |
import static ms.aurora.bal.util.FieldUtils.type; | |
/** | |
* @author rvbiljouw | |
*/ | |
public class FilterIdentifier extends Identifier { | |
public FilterIdentifier(Context context) { | |
super(context); | |
} | |
@Override | |
public void execute() { | |
ClassWrapper wrapper = single(filter(getClasses(), and( | |
hasField(2, and( | |
not(fieldAccess(Constants.ACC_STATIC)), | |
type(Type.getType(int[][][].class)) | |
)), | |
hasFloat(11025.0F), | |
hasFloat(32.703197F), | |
hasFloat(1.2207031E-4F) | |
))); | |
identify(Filter.class, wrapper); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment