Silk DI 0.6


se.jbee.inject.util
Class Metaclass

Object
  extended by se.jbee.inject.util.Metaclass

public final class Metaclass
extends Object

A Metaclass is a meta representation of a Class that allows to analyze it in terms of ideas in the context of 'kinds' or 'meta-classes' in type theory.

Author:
Jan Bernitt (jan@jbee.se)

Method Summary
static
<T extends AccessibleObject>
T
accessible(T obj)
           
static Metaclass metaclass(Class<?> cls)
           
 boolean monomodal()
           
 boolean undeterminable()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

metaclass

public static final Metaclass metaclass(Class<?> cls)

monomodal

public boolean monomodal()
Returns:
A Class is monomodal if it there is just a single possible initial state. All newly created instances can just have this similar initial state but due to internal state they could (not necessarily must) develop (behave) different later on. The opposite of monomodal is multimodal.

undeterminable

public final boolean undeterminable()
Returns:
A Class is indeterminable when there is no determinable way to create instances. This is true for all value types, enums, collection types (including arrays) or any type than cannot be instantiated by its nature (abstract types). Note that this method just covers those types that are *known* to be indeterminable. There will be a lot of user defined types that are indeterminable as well but which will not return true.

accessible

public static <T extends AccessibleObject> T accessible(T obj)
Returns:
the given object made accessible.

Silk DI 0.6