object ReflectionUtils
Reflection utils
- Alphabetic
- By Inheritance
- ReflectionUtils
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
allInterfacesOf[A <: AnyRef](implicit arg0: ClassTag[A]): Set[Class[_]]
Same as
Same as
allInterfacesOf(aClass)
- A
a class type
-
def
allInterfacesOf(c: Class[_]): Set[Class[_]]
Return all interfaces that the given class implements included inherited ones
Return all interfaces that the given class implements included inherited ones
- c
a class
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def caseClassCtorArgDefaultValue[A](t: Class[_], name: String): Option[A]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def compile[A](code: scala.reflect.api.JavaUniverse.Tree): (Map[String, Any]) ⇒ A
-
def
directSubClassesOf[T](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Seq[Class[_ <: T]]
Lists all direct sub-classes of the given sealed type T
Lists all direct sub-classes of the given sealed type T
- T
sealed type
- returns
sequence of classes
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
extractFieldValue[T](o: AnyRef, fieldName: String): T
A single type parameter alternative to
A single type parameter alternative to
extractFieldValue[A, B](a, ...)
where
a.getClass == classOf[A]
extractFieldValue[A, B](a, ...) }}}
-
def
extractFieldValue[A, B](o: AnyRef, fieldName: String)(implicit arg0: ClassTag[A]): B
Extract a value from a given field regardless of its visibility.
Extract a value from a given field regardless of its visibility. This method utilizes a mix of Java and Scala reflection mechanisms, and can extract from a compiler generated fields as well. Note: if the field has an associated Scala accessor one will be called. Consequently if the filed is lazy it will be initialized.
- A
type in which the given field is declared
- B
expected type of the field value to return
- o
target object
- fieldName
field name to extract value from
- returns
a field value
-
def
extractProperties(obj: AnyRef): Map[String, _]
Extract object properties as key-value pairs.
Extract object properties as key-value pairs. Here by
propertieswe understand public accessors that match a primary constructor arguments. As in a case class, for example.- obj
a target instance (in most cases an instance of a case class)
- returns
a map of property names to their values
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
objectForName[T <: AnyRef](name: String): T
Returns an object instance with the specified name.
Returns an object instance with the specified name. Similar to as Class.forName() returns a Class instance by name, this method returns a Scala object instance by name.
- name
fully qualified object instance name
-
def
objectsOf[T <: AnyRef](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Seq[T]
Returns a sequence of all known objects that directly inherit from the given sealed type T
Returns a sequence of all known objects that directly inherit from the given sealed type T
- T
sealed type
- returns
sequence of object instances
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- object ModuleClassSymbolExtractor
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.