Java源码示例:com.apple.internal.jobjc.generator.utils.JavaLang.JLField

示例1
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例2
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例3
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例4
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例5
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例6
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例7
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例8
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例9
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例10
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例11
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例12
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例13
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例14
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例15
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例16
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例17
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例18
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例19
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例20
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例21
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例22
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例23
private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);

    JLField field = new JLField("private static", type.getCanonicalName(), identifier);
    // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
    JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);

    JLCall createIt = new JLCall("new " + type.getCanonicalName());
    createIt.args.add(firstArg(fxn));
    createIt.args.add("\"" + fxn.name + "\"");
    createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
    for (final Arg arg : fxn.args)
        createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());

    getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");

    return field.toString() + getter.toString();
}
 
示例24
@Override public void writeBeginning(final PrintStream out) {
    out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
    out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));

    JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
    getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
    getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
    getInstR.body.add("return instance;");
    out.print(getInstR);

    JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
    getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
    out.print(getInst);

    JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
    ctor.body.add("this.runtime = runtime;");
    for (final Framework f : frameworks)
        ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
    out.print(ctor);
}
 
示例25
private static String createLocalForward(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);
    return new JLField("final", type.getCanonicalName(), identifier, new JLCall("get_" + identifier)).toString();
}
 
示例26
private static String createLocalForward(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);
    return new JLField("final", type.getCanonicalName(), identifier, new JLCall("get_" + identifier)).toString();
}
 
示例27
private static String createLocalForward(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);
    return new JLField("final", type.getCanonicalName(), identifier, new JLCall("get_" + identifier)).toString();
}
 
示例28
private static String createLocalForward(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);
    return new JLField("final", type.getCanonicalName(), identifier, new JLCall("get_" + identifier)).toString();
}
 
示例29
private static String createLocalForward(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);
    return new JLField("final", type.getCanonicalName(), identifier, new JLCall("get_" + identifier)).toString();
}
 
示例30
private static String createLocalForward(final Class<? extends Invoke> type, final Function fxn) {
    final String identifier = makeInstanceName(fxn);
    return new JLField("final", type.getCanonicalName(), identifier, new JLCall("get_" + identifier)).toString();
}