com.apple.internal.jobjc.generator.utils.Fp Java Examples

The following examples show how to use com.apple.internal.jobjc.generator.utils.Fp. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StructClassFile.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    out.println();
    out.println("\tpublic static int SIZEOF = " + JObjCRuntime.class.getName() + ".IS64 ? "
            + ((NStruct) struct.type.type64).sizeof64() + " : " + ((NStruct) struct.type.type32).sizeof32() + ";");
    out.println();
    out.format("\tpublic final static %1$s getStructCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\t@Override public final %1$s getCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\tprivate final static %1$s coder = new %1$s(SIZEOF%2$s%3$s){\n", StructCoder.class.getCanonicalName(),
            (struct.fields.size() > 0 ? ",\n\t\t" : ""),
            Fp.join(",\n\t\t", Fp.map(new Map1<Field,String>(){
                public String apply(Field a) {
                    return a.type.getJType().getCoderDescriptor().getCoderInstanceName();
                }}, struct.fields)));
    out.format("\t\t@Override protected %1$s newInstance(%2$s runtime){ return new %1$s(runtime); }\n",
            struct.name,
            JObjCRuntime.class.getCanonicalName());
    out.println("\t};");
    out.println();
    out.println("\t" + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime){");
    out.println("\t\tsuper(runtime, SIZEOF);");
    out.println("\t}");
    out.println();
    out.println("\tpublic " + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime, final com.apple.jobjc.NativeBuffer buffer) {");
    out.println("\t\tsuper(runtime, buffer, SIZEOF);");
    out.println("\t}");
}
 
Example #2
Source File: StructClassFile.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    out.println();
    out.println("\tpublic static int SIZEOF = " + JObjCRuntime.class.getName() + ".IS64 ? "
            + ((NStruct) struct.type.type64).sizeof64() + " : " + ((NStruct) struct.type.type32).sizeof32() + ";");
    out.println();
    out.format("\tpublic final static %1$s getStructCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\t@Override public final %1$s getCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\tprivate final static %1$s coder = new %1$s(SIZEOF%2$s%3$s){\n", StructCoder.class.getCanonicalName(),
            (struct.fields.size() > 0 ? ",\n\t\t" : ""),
            Fp.join(",\n\t\t", Fp.map(new Map1<Field,String>(){
                public String apply(Field a) {
                    return a.type.getJType().getCoderDescriptor().getCoderInstanceName();
                }}, struct.fields)));
    out.format("\t\t@Override protected %1$s newInstance(%2$s runtime){ return new %1$s(runtime); }\n",
            struct.name,
            JObjCRuntime.class.getCanonicalName());
    out.println("\t};");
    out.println();
    out.println("\t" + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime){");
    out.println("\t\tsuper(runtime, SIZEOF);");
    out.println("\t}");
    out.println();
    out.println("\tpublic " + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime, final com.apple.jobjc.NativeBuffer buffer) {");
    out.println("\t\tsuper(runtime, buffer, SIZEOF);");
    out.println("\t}");
}
 
Example #3
Source File: StructClassFile.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    out.println();
    out.println("\tpublic static int SIZEOF = " + JObjCRuntime.class.getName() + ".IS64 ? "
            + ((NStruct) struct.type.type64).sizeof64() + " : " + ((NStruct) struct.type.type32).sizeof32() + ";");
    out.println();
    out.format("\tpublic final static %1$s getStructCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\t@Override public final %1$s getCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\tprivate final static %1$s coder = new %1$s(SIZEOF%2$s%3$s){\n", StructCoder.class.getCanonicalName(),
            (struct.fields.size() > 0 ? ",\n\t\t" : ""),
            Fp.join(",\n\t\t", Fp.map(new Map1<Field,String>(){
                public String apply(Field a) {
                    return a.type.getJType().getCoderDescriptor().getCoderInstanceName();
                }}, struct.fields)));
    out.format("\t\t@Override protected %1$s newInstance(%2$s runtime){ return new %1$s(runtime); }\n",
            struct.name,
            JObjCRuntime.class.getCanonicalName());
    out.println("\t};");
    out.println();
    out.println("\t" + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime){");
    out.println("\t\tsuper(runtime, SIZEOF);");
    out.println("\t}");
    out.println();
    out.println("\tpublic " + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime, final com.apple.jobjc.NativeBuffer buffer) {");
    out.println("\t\tsuper(runtime, buffer, SIZEOF);");
    out.println("\t}");
}
 
Example #4
Source File: StructClassFile.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    out.println();
    out.println("\tpublic static int SIZEOF = " + JObjCRuntime.class.getName() + ".IS64 ? "
            + ((NStruct) struct.type.type64).sizeof64() + " : " + ((NStruct) struct.type.type32).sizeof32() + ";");
    out.println();
    out.format("\tpublic final static %1$s getStructCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\t@Override public final %1$s getCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\tprivate final static %1$s coder = new %1$s(SIZEOF%2$s%3$s){\n", StructCoder.class.getCanonicalName(),
            (struct.fields.size() > 0 ? ",\n\t\t" : ""),
            Fp.join(",\n\t\t", Fp.map(new Map1<Field,String>(){
                public String apply(Field a) {
                    return a.type.getJType().getCoderDescriptor().getCoderInstanceName();
                }}, struct.fields)));
    out.format("\t\t@Override protected %1$s newInstance(%2$s runtime){ return new %1$s(runtime); }\n",
            struct.name,
            JObjCRuntime.class.getCanonicalName());
    out.println("\t};");
    out.println();
    out.println("\t" + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime){");
    out.println("\t\tsuper(runtime, SIZEOF);");
    out.println("\t}");
    out.println();
    out.println("\tpublic " + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime, final com.apple.jobjc.NativeBuffer buffer) {");
    out.println("\t\tsuper(runtime, buffer, SIZEOF);");
    out.println("\t}");
}
 
Example #5
Source File: StructClassFile.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    out.println();
    out.println("\tpublic static int SIZEOF = " + JObjCRuntime.class.getName() + ".IS64 ? "
            + ((NStruct) struct.type.type64).sizeof64() + " : " + ((NStruct) struct.type.type32).sizeof32() + ";");
    out.println();
    out.format("\tpublic final static %1$s getStructCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\t@Override public final %1$s getCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\tprivate final static %1$s coder = new %1$s(SIZEOF%2$s%3$s){\n", StructCoder.class.getCanonicalName(),
            (struct.fields.size() > 0 ? ",\n\t\t" : ""),
            Fp.join(",\n\t\t", Fp.map(new Map1<Field,String>(){
                public String apply(Field a) {
                    return a.type.getJType().getCoderDescriptor().getCoderInstanceName();
                }}, struct.fields)));
    out.format("\t\t@Override protected %1$s newInstance(%2$s runtime){ return new %1$s(runtime); }\n",
            struct.name,
            JObjCRuntime.class.getCanonicalName());
    out.println("\t};");
    out.println();
    out.println("\t" + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime){");
    out.println("\t\tsuper(runtime, SIZEOF);");
    out.println("\t}");
    out.println();
    out.println("\tpublic " + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime, final com.apple.jobjc.NativeBuffer buffer) {");
    out.println("\t\tsuper(runtime, buffer, SIZEOF);");
    out.println("\t}");
}
 
Example #6
Source File: StructClassFile.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    out.println();
    out.println("\tpublic static int SIZEOF = " + JObjCRuntime.class.getName() + ".IS64 ? "
            + ((NStruct) struct.type.type64).sizeof64() + " : " + ((NStruct) struct.type.type32).sizeof32() + ";");
    out.println();
    out.format("\tpublic final static %1$s getStructCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\t@Override public final %1$s getCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\tprivate final static %1$s coder = new %1$s(SIZEOF%2$s%3$s){\n", StructCoder.class.getCanonicalName(),
            (struct.fields.size() > 0 ? ",\n\t\t" : ""),
            Fp.join(",\n\t\t", Fp.map(new Map1<Field,String>(){
                public String apply(Field a) {
                    return a.type.getJType().getCoderDescriptor().getCoderInstanceName();
                }}, struct.fields)));
    out.format("\t\t@Override protected %1$s newInstance(%2$s runtime){ return new %1$s(runtime); }\n",
            struct.name,
            JObjCRuntime.class.getCanonicalName());
    out.println("\t};");
    out.println();
    out.println("\t" + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime){");
    out.println("\t\tsuper(runtime, SIZEOF);");
    out.println("\t}");
    out.println();
    out.println("\tpublic " + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime, final com.apple.jobjc.NativeBuffer buffer) {");
    out.println("\t\tsuper(runtime, buffer, SIZEOF);");
    out.println("\t}");
}
 
Example #7
Source File: StructClassFile.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    out.println();
    out.println("\tpublic static int SIZEOF = " + JObjCRuntime.class.getName() + ".IS64 ? "
            + ((NStruct) struct.type.type64).sizeof64() + " : " + ((NStruct) struct.type.type32).sizeof32() + ";");
    out.println();
    out.format("\tpublic final static %1$s getStructCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\t@Override public final %1$s getCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
    out.format("\tprivate final static %1$s coder = new %1$s(SIZEOF%2$s%3$s){\n", StructCoder.class.getCanonicalName(),
            (struct.fields.size() > 0 ? ",\n\t\t" : ""),
            Fp.join(",\n\t\t", Fp.map(new Map1<Field,String>(){
                public String apply(Field a) {
                    return a.type.getJType().getCoderDescriptor().getCoderInstanceName();
                }}, struct.fields)));
    out.format("\t\t@Override protected %1$s newInstance(%2$s runtime){ return new %1$s(runtime); }\n",
            struct.name,
            JObjCRuntime.class.getCanonicalName());
    out.println("\t};");
    out.println();
    out.println("\t" + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime){");
    out.println("\t\tsuper(runtime, SIZEOF);");
    out.println("\t}");
    out.println();
    out.println("\tpublic " + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime, final com.apple.jobjc.NativeBuffer buffer) {");
    out.println("\t\tsuper(runtime, buffer, SIZEOF);");
    out.println("\t}");
}
 
Example #8
Source File: NativeEnum.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public boolean confirm(String... values){
    return Fp.all(new Fp.Map1<String,Boolean>(){
        public Boolean apply(String a) {
            try{ return a == null || confirm(a); }
            catch(Exception x){ return false; }
        }},
        Arrays.asList(values));
}
 
Example #9
Source File: FrameworkClassFile.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    List<String> binPaths = Fp.map(new Map1<File,String>(){
        public String apply(File a) { return "\"" + a.getAbsolutePath() + "\""; }},
        framework.binaries);
    out.println(new Utils.Substituter(
            "#public " + className + "(" + JObjCRuntime.class.getName() + " runtime) {~" +
            "##super(runtime, new String[]{" + Fp.join(", ", binPaths) + "});~" +
            "#}~"
    ));
}
 
Example #10
Source File: NativeEnum.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public boolean confirm(String... values){
    return Fp.all(new Fp.Map1<String,Boolean>(){
        public Boolean apply(String a) {
            try{ return a == null || confirm(a); }
            catch(Exception x){ return false; }
        }},
        Arrays.asList(values));
}
 
Example #11
Source File: Framework.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void parseClasses() {
    classes = new HashSet<Clazz>(getNodesFor(rootNode, "class", Clazz.class, this));
    classes = Fp.filterSet(new Map1<Clazz,Boolean>(){
        public Boolean apply(Clazz a) {
            if(a.doesActuallyExist())
                return true;
            else{
                System.out.println("Could not find class " + name + ":" + a.name + " in runtime. Discarding.");
                return false;
            }
        }}, classes);
    informalProtocols = getNodesFor(rootNode, "informal_protocol", InformalProtocol.class, this);
}
 
Example #12
Source File: Framework.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void parseDependencies(final Collection<Framework> frameworks) {
    // Parse
    dependencies = getNodesFor(rootNode, "depends_on", FrameworkDependency.class, this);
    // Resolve
    for(final FrameworkDependency dep : dependencies)
        dep.object = Fp.find(new Map1<Framework,Boolean>(){
            public Boolean apply(Framework f) {
                return f.path.equals(dep.path);
            }}, frameworks);
}
 
Example #13
Source File: Framework.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void parseClasses() {
    classes = new HashSet<Clazz>(getNodesFor(rootNode, "class", Clazz.class, this));
    classes = Fp.filterSet(new Map1<Clazz,Boolean>(){
        public Boolean apply(Clazz a) {
            if(a.doesActuallyExist())
                return true;
            else{
                System.out.println("Could not find class " + name + ":" + a.name + " in runtime. Discarding.");
                return false;
            }
        }}, classes);
    informalProtocols = getNodesFor(rootNode, "informal_protocol", InformalProtocol.class, this);
}
 
Example #14
Source File: FrameworkClassFile.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    List<String> binPaths = Fp.map(new Map1<File,String>(){
        public String apply(File a) { return "\"" + a.getAbsolutePath() + "\""; }},
        framework.binaries);
    out.println(new Utils.Substituter(
            "#public " + className + "(" + JObjCRuntime.class.getName() + " runtime) {~" +
            "##super(runtime, new String[]{" + Fp.join(", ", binPaths) + "});~" +
            "#}~"
    ));
}
 
Example #15
Source File: FrameworkClassFile.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    List<String> binPaths = Fp.map(new Map1<File,String>(){
        public String apply(File a) { return "\"" + a.getAbsolutePath() + "\""; }},
        framework.binaries);
    out.println(new Utils.Substituter(
            "#public " + className + "(" + JObjCRuntime.class.getName() + " runtime) {~" +
            "##super(runtime, new String[]{" + Fp.join(", ", binPaths) + "});~" +
            "#}~"
    ));
}
 
Example #16
Source File: Framework.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void parseClasses() {
    classes = new HashSet<Clazz>(getNodesFor(rootNode, "class", Clazz.class, this));
    classes = Fp.filterSet(new Map1<Clazz,Boolean>(){
        public Boolean apply(Clazz a) {
            if(a.doesActuallyExist())
                return true;
            else{
                System.out.println("Could not find class " + name + ":" + a.name + " in runtime. Discarding.");
                return false;
            }
        }}, classes);
    informalProtocols = getNodesFor(rootNode, "informal_protocol", InformalProtocol.class, this);
}
 
Example #17
Source File: Framework.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void parseClasses() {
    classes = new HashSet<Clazz>(getNodesFor(rootNode, "class", Clazz.class, this));
    classes = Fp.filterSet(new Map1<Clazz,Boolean>(){
        public Boolean apply(Clazz a) {
            if(a.doesActuallyExist())
                return true;
            else{
                System.out.println("Could not find class " + name + ":" + a.name + " in runtime. Discarding.");
                return false;
            }
        }}, classes);
    informalProtocols = getNodesFor(rootNode, "informal_protocol", InformalProtocol.class, this);
}
 
Example #18
Source File: NativeEnum.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public boolean confirm(String... values){
    return Fp.all(new Fp.Map1<String,Boolean>(){
        public Boolean apply(String a) {
            try{ return a == null || confirm(a); }
            catch(Exception x){ return false; }
        }},
        Arrays.asList(values));
}
 
Example #19
Source File: Framework.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void parseDependencies(final Collection<Framework> frameworks) {
    // Parse
    dependencies = getNodesFor(rootNode, "depends_on", FrameworkDependency.class, this);
    // Resolve
    for(final FrameworkDependency dep : dependencies)
        dep.object = Fp.find(new Map1<Framework,Boolean>(){
            public Boolean apply(Framework f) {
                return f.path.equals(dep.path);
            }}, frameworks);
}
 
Example #20
Source File: NativeEnum.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean confirm(String... values){
    return Fp.all(new Fp.Map1<String,Boolean>(){
        public Boolean apply(String a) {
            try{ return a == null || confirm(a); }
            catch(Exception x){ return false; }
        }},
        Arrays.asList(values));
}
 
Example #21
Source File: NativeEnum.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public boolean confirm(String... values){
    return Fp.all(new Fp.Map1<String,Boolean>(){
        public Boolean apply(String a) {
            try{ return a == null || confirm(a); }
            catch(Exception x){ return false; }
        }},
        Arrays.asList(values));
}
 
Example #22
Source File: Framework.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void parseClasses() {
    classes = new HashSet<Clazz>(getNodesFor(rootNode, "class", Clazz.class, this));
    classes = Fp.filterSet(new Map1<Clazz,Boolean>(){
        public Boolean apply(Clazz a) {
            if(a.doesActuallyExist())
                return true;
            else{
                System.out.println("Could not find class " + name + ":" + a.name + " in runtime. Discarding.");
                return false;
            }
        }}, classes);
    informalProtocols = getNodesFor(rootNode, "informal_protocol", InformalProtocol.class, this);
}
 
Example #23
Source File: Framework.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void parseDependencies(final Collection<Framework> frameworks) {
    // Parse
    dependencies = getNodesFor(rootNode, "depends_on", FrameworkDependency.class, this);
    // Resolve
    for(final FrameworkDependency dep : dependencies)
        dep.object = Fp.find(new Map1<Framework,Boolean>(){
            public Boolean apply(Framework f) {
                return f.path.equals(dep.path);
            }}, frameworks);
}
 
Example #24
Source File: FrameworkClassFile.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    List<String> binPaths = Fp.map(new Map1<File,String>(){
        public String apply(File a) { return "\"" + a.getAbsolutePath() + "\""; }},
        framework.binaries);
    out.println(new Utils.Substituter(
            "#public " + className + "(" + JObjCRuntime.class.getName() + " runtime) {~" +
            "##super(runtime, new String[]{" + Fp.join(", ", binPaths) + "});~" +
            "#}~"
    ));
}
 
Example #25
Source File: NativeEnum.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public boolean confirm(String... values){
    return Fp.all(new Fp.Map1<String,Boolean>(){
        public Boolean apply(String a) {
            try{ return a == null || confirm(a); }
            catch(Exception x){ return false; }
        }},
        Arrays.asList(values));
}
 
Example #26
Source File: Framework.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void parseClasses() {
    classes = new HashSet<Clazz>(getNodesFor(rootNode, "class", Clazz.class, this));
    classes = Fp.filterSet(new Map1<Clazz,Boolean>(){
        public Boolean apply(Clazz a) {
            if(a.doesActuallyExist())
                return true;
            else{
                System.out.println("Could not find class " + name + ":" + a.name + " in runtime. Discarding.");
                return false;
            }
        }}, classes);
    informalProtocols = getNodesFor(rootNode, "informal_protocol", InformalProtocol.class, this);
}
 
Example #27
Source File: Framework.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void parseDependencies(final Collection<Framework> frameworks) {
    // Parse
    dependencies = getNodesFor(rootNode, "depends_on", FrameworkDependency.class, this);
    // Resolve
    for(final FrameworkDependency dep : dependencies)
        dep.object = Fp.find(new Map1<Framework,Boolean>(){
            public Boolean apply(Framework f) {
                return f.path.equals(dep.path);
            }}, frameworks);
}
 
Example #28
Source File: FrameworkClassFile.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    List<String> binPaths = Fp.map(new Map1<File,String>(){
        public String apply(File a) { return "\"" + a.getAbsolutePath() + "\""; }},
        framework.binaries);
    out.println(new Utils.Substituter(
            "#public " + className + "(" + JObjCRuntime.class.getName() + " runtime) {~" +
            "##super(runtime, new String[]{" + Fp.join(", ", binPaths) + "});~" +
            "#}~"
    ));
}
 
Example #29
Source File: Framework.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void parseDependencies(final Collection<Framework> frameworks) {
    // Parse
    dependencies = getNodesFor(rootNode, "depends_on", FrameworkDependency.class, this);
    // Resolve
    for(final FrameworkDependency dep : dependencies)
        dep.object = Fp.find(new Map1<Framework,Boolean>(){
            public Boolean apply(Framework f) {
                return f.path.equals(dep.path);
            }}, frameworks);
}
 
Example #30
Source File: FrameworkClassFile.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override public void writeBeginning(final PrintStream out) {
    List<String> binPaths = Fp.map(new Map1<File,String>(){
        public String apply(File a) { return "\"" + a.getAbsolutePath() + "\""; }},
        framework.binaries);
    out.println(new Utils.Substituter(
            "#public " + className + "(" + JObjCRuntime.class.getName() + " runtime) {~" +
            "##super(runtime, new String[]{" + Fp.join(", ", binPaths) + "});~" +
            "#}~"
    ));
}