Object

org.clapper.classutil

ClassUtil

Related Doc: package classutil

Permalink

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
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

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

    Permalink

    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

  6. def clone(): AnyRef

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

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

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

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

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

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

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

    Permalink

    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

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

    Permalink

    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

  15. def isPrimitive(obj: Any): Boolean

    Permalink

    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.

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

    Permalink

    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

  17. def methodSignature(method: Method): String

    Permalink

    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

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

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped