Skip to content

Can't get the class of inner classes #3

@freewind

Description

@freewind

Suppose there is a class with an inner class:

class Out {
    class In {
        def foo(name:String) = ""
    }
}

I have get the method of Out.In.foo, and I want to get the parameter names of it:

for {
    clazz <- Mirror.ofClass(method.getDeclaringClass).toSeq
    method <- clazz.allDefs.find(_.name == method.getName).toSeq
    param <- method.flatParams
} yield (param.name, param.symType.toString)

But seems can't find that inner class:

Mirror.ofClass(method.getDeclaringClass).toSeq

returns a List()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions