This file contains hidden or 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
| scala> rootMirror.getClassByName(newTermName("java.lang.reflect.Method")) | |
| res5: $r.intp.global.ClassSymbol = class Method | |
| scala> res5.info.member(newTermName("invoke")) | |
| res7: $r.intp.global.Symbol = method invoke | |
| scala> res7.annotations | |
| res8: List[$r.intp.global.AnnotationInfo] = List(throws(classOf[java.lang.reflect.InvocationTargetException]), throws(classOf[java.lang.IllegalArgumentException]), throws(classOf[java.lang.IllegalAccessException])) | |
| scala> res8.head |
This file contains hidden or 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
| Grzegorzs-MacBook-Pro:scala-master grek (master)$ ant -Dscalac.args="-Yinline-warnings" build-opt | |
| Buildfile: /Users/grek/scala/scala-master/build.xml | |
| build-opt: | |
| init.jars.check: | |
| init.jars: | |
| init.maven.tasks: |
This file contains hidden or 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
| filter { | |
| problems=[ | |
| # Scala library | |
| { | |
| # Lifted method called only from Stream | |
| matchName="scala.collection.immutable.Stream.scala$collection$immutable$Stream$$loop$4" | |
| problemName=MissingMethodProblem | |
| }, | |
| { | |
| # Lifted method called only from Stream |
This file contains hidden or 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
| > scripted source-dependencies/* | |
| [info] Packaging /Users/grek/scala/xsbt/testing/agent/target/test-agent-0.13.0-M1-sources.jar ... | |
| [info] Packaging /Users/grek/scala/xsbt/launch/interface/target/launcher-interface-0.13.0-M1-sources.jar ... | |
| [info] Packaging /Users/grek/scala/xsbt/interface/target/interface-0.13.0-M1-sources.jar ... | |
| [info] Packaging /Users/grek/scala/xsbt/cache/tracking/target/tracking-0.13.0-M1-sources.jar ... | |
| [info] Packaging /Users/grek/scala/xsbt/compile/api/target/api-0.13.0-M1-sources.jar ... | |
| [info] Packaging /Users/grek/scala/xsbt/util/log/target/logging-0.13.0-M1-sources.jar ... | |
| [info] Packaging /Users/grek/scala/xsbt/compile/interface/target/precompiled_2.9.2/precompiled-2_9_2-0.13.0-M1-sources.jar ... | |
| [info] Packaging /Users/grek/scala/xsbt/ivy/target/ivy-0.13.0-M1-sources.jar ... | |
| [info] Done packaging. |
This file contains hidden or 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
| Grzegorzs-MacBook-Pro:openmole grek ((cafbd66...))$ ~/Downloads/scala-2.9.2/bin/scalac -d project/target/scala-2.9.2/sbt-0.12/classes -classpath /Users/grek/tmp/openmole/project/target/scala-2.9.2/sbt-0.12/classes:/Users/grek/.ivy2/cache/scala_2.9.2/sbt_0.12/com.typesafe.sbt/sbt-osgi/jars/sbt-osgi-0.6.0-SNAPSHOT.jar:/Users/grek/.ivy2/cache/biz.aQute/bndlib/jars/bndlib-1.50.0.jar:/Users/grek/.ivy2/cache/scala_2.9.2/sbt_0.12/com.github.mpeltonen/sbt-idea/jars/sbt-idea-1.2.0.jar:/Users/grek/.ivy2/cache/commons-io/commons-io/jars/commons-io-2.0.1.jar:/Users/grek/.ivy2/cache/scala_2.9.2/sbt_0.12/net.virtual-void/sbt-dependency-graph/jars/sbt-dependency-graph-0.7.1.jar:/Users/grek/.ivy2/cache/com.github.mdr/ascii-graphs_2.9.2/jars/ascii-graphs_2.9.2-0.0.2.jar:/Users/grek/.ivy2/cache/org.scala-sbt/sbt/jars/sbt-0.12.3.jar:/Users/grek/.ivy2/cache/org.scala-sbt/main/jars/main-0.12.3.jar:/Users/grek/.ivy2/cache/org.scala-sbt/actions/jars/actions-0.12.3.jar:/Users/grek/.ivy2/cache/org.scala-sbt/classpath/jars/classpath-0 |
This file contains hidden or 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
| import java.util.*; | |
| import java.util.function.Predicate; | |
| import java.util.function.Consumer; | |
| public class Collections8 { | |
| public static void main(String[] args) { | |
| List<String> names = Arrays.asList("Alice", "Bob", "Charlie"); | |
| forEach(filter(names, e -> e.length() > 4), e -> { System.out.println(e); }); | |
| //names.filter().forEach(e -> { System.out.println(e); }); | |
| } |
This file contains hidden or 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
| import javax.tools._ | |
| object CompileGuava { | |
| def main(args: Array[String]) { | |
| val mavenRepo: String = args(0) | |
| val guavaRoot: String = args(1) | |
| val argsString = s"-d ${guavaRoot}/target/classes -classpath ${guavaRoot}/target/classes:${mavenRepo}/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:${mavenRepo}/javax/inject/javax.inject/1/javax.inject-1.jar: -sourcepath ${guavaRoot}/src: ${guavaRoot}/src/com/google/common/collect/SortedMapDifference.java ${guavaRoot}/src/com/google/common/collect/BoundType.java ${guavaRoot}/src/com/google/common/util/concurrent/AsyncFunction.java ${guavaRoot}/src/com/google/common/collect/Multimap.java ${guavaRoot}/src/com/google/common/collect/AbstractSortedSetMultimap.java ${guavaRoot}/src/com/google/common/collect/ImmutableMapEntrySet.java ${guavaRoot}/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java ${guavaRoot}/src/com/google/common/io/Closer.java ${guavaRoot}/src/com/google/common/math/MathPreconditions.java ${guavaRoot}/src/com/google/commo |
This file contains hidden or 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
| scalac -Ylog-classpath | |
| Classpath built from (-d = . -encoding = UTF-8 -Ylog-classpath = true) | |
| Defaults: object Defaults { | |
| scalaHome = /usr/local/Cellar/scala/2.10.0/libexec | |
| javaBootClassPath = | |
| /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar | |
| /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar | |
| /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar | |
| /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar | |
| /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar |
This file contains hidden or 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
| import com.yourkit.probes.*; | |
| import com.yourkit.api.*; | |
| @MethodPattern("scala.tools.nsc.Global$Run:advancePhase()") | |
| public class MemoryProbe { | |
| public static void onEnter(@This scala.tools.nsc.Global.Run run) { | |
| scala.reflect.internal.Phase patmatPhase = run.phaseNamed("patmat"); | |
| scala.reflect.internal.Phase postErasurePhase = run.phaseNamed("posterasure"); | |
| scala.reflect.internal.Phase icodePhase = run.phaseNamed("icode"); |
This file contains hidden or 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 cons | |
| import mac._ | |
| class Consumer { | |
| val f: Foo = new Foo | |
| Rewrite.rewrite(f.k) | |
| } | |
| class Foo { |