diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-08-27 16:33:16 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-08-27 16:33:16 +0200 |
commit | cc85f804f9afa923bdb75ab28548fcd31a00738c (patch) | |
tree | 1599f2e1995e5b2b27056f2c4b17fc3ea645a0f7 /src | |
parent | 33344651030213fe762bd81a66cf683d15a69b40 (diff) | |
download | scala-cc85f804f9afa923bdb75ab28548fcd31a00738c.tar.gz scala-cc85f804f9afa923bdb75ab28548fcd31a00738c.tar.bz2 scala-cc85f804f9afa923bdb75ab28548fcd31a00738c.zip |
adds Symbol.isJava
Doesn't seem to be inferrable from the API we expose right now
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/api/Symbols.scala | 4 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala index 132fa42670..c3fbcb4ed8 100644 --- a/src/reflect/scala/reflect/api/Symbols.scala +++ b/src/reflect/scala/reflect/api/Symbols.scala @@ -182,6 +182,10 @@ trait Symbols extends base.Symbols { self: Universe => */ def isSpecialized: Boolean + /** Is this symbol defined by Java? + */ + def isJava: Boolean + /******************* helpers *******************/ /** ... diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index ecc7c001cc..5a0c6bffb4 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -68,6 +68,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => def isParamWithDefault: Boolean = this.hasDefault def isByNameParam: Boolean = this.isValueParameter && (this hasFlag BYNAMEPARAM) def isImplementationArtifact: Boolean = (this hasFlag BRIDGE) || (this hasFlag VBRIDGE) || (this hasFlag ARTIFACT) + def isJava: Boolean = this hasFlag JAVA def newNestedSymbol(name: Name, pos: Position, newFlags: Long, isClass: Boolean): Symbol = name match { case n: TermName => newTermSymbol(n, pos, newFlags) |