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

The following examples show how to use com.apple.internal.jobjc.generator.utils.Fp. These examples are extracted from open source projects. 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
@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("\[email protected] 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\[email protected] 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 Project: jdk8u60   Source File: StructClassFile.java    License: 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("\[email protected] 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\[email protected] 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
@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("\[email protected] 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\[email protected] 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 Project: jdk8u-jdk   Source File: StructClassFile.java    License: 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("\[email protected] 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\[email protected] 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 Project: hottub   Source File: StructClassFile.java    License: 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("\[email protected] 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\[email protected] 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 Project: jdk8u-jdk   Source File: StructClassFile.java    License: 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("\[email protected] 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\[email protected] 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 Project: jdk8u_jdk   Source File: StructClassFile.java    License: 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("\[email protected] 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\[email protected] 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 Project: dragonwell8_jdk   Source File: Framework.java    License: 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 9
Source Project: dragonwell8_jdk   Source File: Framework.java    License: 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 10
Source Project: dragonwell8_jdk   Source File: NativeEnum.java    License: 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
@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 12
Source Project: TencentKona-8   Source File: Framework.java    License: 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 Project: TencentKona-8   Source File: Framework.java    License: 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 Project: TencentKona-8   Source File: NativeEnum.java    License: 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 15
@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
@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 17
Source Project: jdk8u60   Source File: Framework.java    License: 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 18
Source Project: jdk8u60   Source File: Framework.java    License: 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 19
Source Project: jdk8u-dev-jdk   Source File: Framework.java    License: 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 20
Source Project: jdk8u60   Source File: FrameworkClassFile.java    License: 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 21
Source Project: openjdk-jdk8u   Source File: Framework.java    License: 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 22
Source Project: openjdk-jdk8u   Source File: Framework.java    License: 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 Project: openjdk-jdk8u   Source File: NativeEnum.java    License: 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 24
@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
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 26
Source Project: jdk8u-jdk   Source File: FrameworkClassFile.java    License: 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 27
Source Project: jdk8u-jdk   Source File: Framework.java    License: 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
@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 Project: jdk8u-jdk   Source File: Framework.java    License: 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 Project: jdk8u-jdk   Source File: Framework.java    License: 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);
}