org.clapper.classutil

ClassUtil

object ClassUtil

Some general-purpose class-related utility functions.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ClassUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def classSignature(cls: Class[_]): String

    Generate a runtime signature for a class (type).

    Generate a runtime signature for a class (type). For instance:

    java.lang.String  ->  Ljava/lang/String;
    int               ->  I
    cls

    The class (type)

    returns

    its string signature

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. def isOfType[T](v: Any)(implicit arg0: ClassTag[T]): Boolean

    Determine if a value is of, or is assignable to, a specified type.

    Determine if a value is of, or is assignable to, a specified type. Works with generics. Example of use:

    val value: Any = ...
    assert(isOfType[Map[String,Int]](value))
    T

    the type against which to check the value

    returns

    whether or not value conforms to type T

  16. def isPrimitive[T](cls: Class[T])(implicit arg0: ClassTag[T]): Boolean

    Determine whether a class represents an underlying primitive or not.

    Determine whether a class represents an underlying primitive or not. For instance, Int, Float and Unit all represent underlying primitives. Note that Java classes are considered primitives if they *are*, in fact, primitives, or if they represent boxed forms of primitives.

    cls

    the class

    returns

    true if the class represents a primitive, false if not

  17. def isPrimitive(obj: Any): Boolean

    Determine whether an object is a primitive or not.

    Determine whether an object is a primitive or not.

    obj

    the object

    returns

    true if its class is a primitive, false if not.

  18. def loadClass(classLoader: ClassLoader, className: String, classBytes: Array[Byte]): Class[_]

    Convenience method to load a class from an array of class bytes.

    Convenience method to load a class from an array of class bytes.

    classLoader

    the class loader to use

    className

    the name of the class

    classBytes

    the class's byte code

    returns

    the loaded class

  19. def methodSignature(method: Method): String

    Generate a runtime signature for a method.

    Generate a runtime signature for a method. See, for instance: http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/method.html

    method

    method, from java.lang.reflect

    returns

    its string signature

  20. def methodSignature(returnType: Class[_], paramTypes: Array[Class[_]]): String

    Generate a runtime signature for a method.

    Generate a runtime signature for a method. See, for instance: http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/method.html

    returnType

    the method's return type

    paramTypes

    the methods parameter types. An empty array signifies a method that takes no parameters.

    returns

    its string signature

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped