当前位置: 首页>>代码示例>>Java>>正文


Java Obf类代码示例

本文整理汇总了Java中com.mumfrey.liteloader.core.runtime.Obf的典型用法代码示例。如果您正苦于以下问题:Java Obf类的具体用法?Java Obf怎么用?Java Obf使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Obf类属于com.mumfrey.liteloader.core.runtime包,在下文中一共展示了Obf类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEnv

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
private int getEnv(Obf obf, String name) {
    int env;
    if (name.equals(obf.name)) {
        // mcp
        env = Obf.MCP;
    } else if (name.equals(obf.obf)) {
        // obf
        env = Obf.OBF;
    } else if (name.equals(obf.srg)) {
        // srg
        env = Obf.SRG;
    } else {
        throw new IllegalArgumentException("Given method name is not in Obf table: " + name);
    }
    return env;
}
 
开发者ID:killjoy1221,项目名称:Protocol4,代码行数:17,代码来源:PacketIOTransformer.java

示例2: create

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
public static BLMethodInfo create(String method) {
    if (method == null) {
        return null;
    }
    String[] methAndDesc = method.split(Patterns.SPACE);
    if (methAndDesc.length < 2) {
        throw new IllegalArgumentException("Method ID must contain method name and descriptor separated by a space!");
    }
    String desc = methAndDesc[1];
    String[] nameParts = methAndDesc[0].split(Patterns.PERIOD);
    if (nameParts.length < 2) {
        throw new IllegalArgumentException("Method name must contain class and method name!");
    }
    String name = nameParts[nameParts.length - 1];

    Obf owner = getObfType(getClassName(nameParts));
    return new BLMethodInfo(owner, name, desc);
}
 
开发者ID:warriordog,项目名称:BlazeLoader,代码行数:19,代码来源:BLMethodInfo.java

示例3: setupGsonSerialiser

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
@Override
public void setupGsonSerialiser(GsonBuilder gsonBuilder) {
    new PrivateFields<GsonBuilder, Excluder>(GsonBuilder.class, new Obf("excluder") {}) {}
            .set(gsonBuilder, Excluder.DEFAULT); // grr
    gsonBuilder
            .registerTypeAdapterFactory(new EnumTypeAdapterFactory())
            .registerTypeHierarchyAdapter(Value.class, new ValueSerializer());
}
 
开发者ID:killjoy1221,项目名称:MnM-Utils,代码行数:9,代码来源:SettingsFile.java

示例4: hasSuper

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
private boolean hasSuper(ClassNode cn, Obf packet) {
    boolean has = false;
    String superName = cn.superName;
    if (arrayHas(makeRef(packet.names), superName)) {
        has = true;
    }

    return has;
}
 
开发者ID:killjoy1221,项目名称:Protocol4,代码行数:10,代码来源:PacketIOTransformer.java

示例5: createDescriptor

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
private String createDescriptor(int env, Obf... params) {
    StringBuilder strParams = new StringBuilder();
    for (Obf obf : params) {
        strParams.append(obf.getDescriptor(env));
    }
    String ret = "V";
    return String.format("(%s)%s", strParams.toString(), ret);
}
 
开发者ID:killjoy1221,项目名称:Protocol4,代码行数:9,代码来源:PacketIOTransformer.java

示例6: getObfType

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
private static Obf getObfType(String name) {
    if (!Versions.isGameObfuscated()) {
        return BLOBF.getClass(name, OBFLevel.MCP);
    }
    if (Versions.isForgeInstalled()) {
        return BLOBF.getClass(name, OBFLevel.SRG);
    }
    return BLOBF.getClass(name, OBFLevel.OBF);
}
 
开发者ID:warriordog,项目名称:BlazeLoader,代码行数:10,代码来源:BLMethodInfo.java

示例7: PonyFields

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
protected PonyFields(Class<P> owner, Obf obf) {
    super(owner, obf);
}
 
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:4,代码来源:PonyFields.java

示例8: field

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
private static <P, T> PrivateFields<P, T> field(Class<P> c, Obf o) {
    return new PonyFields<>(c, o);
}
 
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:4,代码来源:PonyFields.java

示例9: BLMethodInfo

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
private BLMethodInfo(Obf owner, String method, String desc, String simpleName) {
    super(owner, method, desc);
    this.simpleName = simpleName;
}
 
开发者ID:warriordog,项目名称:BlazeLoader,代码行数:5,代码来源:BLMethodInfo.java

示例10: addBLConstructorEvent

import com.mumfrey.liteloader.core.runtime.Obf; //导入依赖的package包/类
protected void addBLConstructorEvent(EventSide side, String clazz, Object[] paramaterTypes, InjectionPoint injectionPoint) {
	BLOBF clas = BLOBF.getClass(clazz, OBFLevel.MCP);
	String name = clas.simpleName;
	addEvent(Event.getOrCreate("BL.<init>." + name, true), new MethodInfo(clas, Obf.constructor, Void.TYPE, paramaterTypes), injectionPoint).addListener(new MethodInfo(side.getHandler(), "init" + capitaliseFirst(name)));
}
 
开发者ID:warriordog,项目名称:BlazeLoader,代码行数:6,代码来源:BLEventInjectionTransformer.java


注:本文中的com.mumfrey.liteloader.core.runtime.Obf类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。