org.jboss.byteman.rule.type
Class TypeGroup

java.lang.Object
  extended by org.jboss.byteman.rule.type.TypeGroup

public class TypeGroup
extends java.lang.Object

the collection of types associated with an ECA rule


Field Summary
protected  java.util.HashMap<java.lang.String,Type> typeTable
           
 
Constructor Summary
TypeGroup(java.lang.ClassLoader loader)
          create a type group for a rule containing all the basic types
 
Method Summary
 void addExceptionTypes(java.lang.String[] exceptionTypeNames)
           
 Type create(java.lang.String name)
          create a type with a given name or return an existing type if the supplied name can be matched.
 Type create(java.lang.String name, java.lang.Class clazz)
          create a type with a given name and class or return an existing type if the supplied name and class can be matched.
 Type createArray(Type baseType)
           
 Type ensureType(java.lang.Class clazz)
           
 java.util.List<Type> getExceptionTypes()
           
 Type lookup(java.lang.String name)
          lookup a type by name dereferencing it to its fully qualified type if that exists
 Type match(java.lang.String[] path)
           
 void resolveTypes()
          try to associate each type in the typegroup with a class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeTable

protected java.util.HashMap<java.lang.String,Type> typeTable
Constructor Detail

TypeGroup

public TypeGroup(java.lang.ClassLoader loader)
create a type group for a rule containing all the basic types

Method Detail

lookup

public Type lookup(java.lang.String name)
lookup a type by name dereferencing it to its fully qualified type if that exists

Parameters:
name -
Returns:

create

public Type create(java.lang.String name)
create a type with a given name or return an existing type if the supplied name can be matched. if the type name is qualified ensure that any existing type with an unqualified name matching this entry is not already aliased to another type.

Parameters:
name -
Returns:
the type if created or matched or null if there is an alias mismatch

create

public Type create(java.lang.String name,
                   java.lang.Class clazz)
create a type with a given name and class or return an existing type if the supplied name and class can be matched. if the type name is qualified ensure that any existing type with an unqualified name matching this entry is not already aliased to another type.

Parameters:
name -
clazz -
Returns:
the type if created or matched or null if there is a class or alias mismatch

resolveTypes

public void resolveTypes()
try to associate each type in the typegroup with a class


createArray

public Type createArray(Type baseType)

addExceptionTypes

public void addExceptionTypes(java.lang.String[] exceptionTypeNames)

getExceptionTypes

public java.util.List<Type> getExceptionTypes()

ensureType

public Type ensureType(java.lang.Class clazz)

match

public Type match(java.lang.String[] path)


Copyright © 2012. All Rights Reserved.