Package org.jboss.byteman.rule.type
Class TypeGroup
java.lang.Object
org.jboss.byteman.rule.type.TypeGroup
the collection of types associated with an ECA rule
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTypeGroup
(ClassLoader loader) create a type group for a rule containing all the basic types -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExceptionTypes
(String[] exceptionTypeNames) private boolean
checkAlias
(Type type) if the supplied type has a package qualified name ensure that any existing entry with the unqualified name is aliased to it or else add an entry with an unqualified name as an alias for it.create a type with a given name or return an existing type if the supplied name can be matched.create a type with a given name and class or return an existing type if the supplied name and class can be matched.createArray
(Type baseType) ensureType
(Class clazz) lookup a type by name dereferencing it to its fully qualified type if that existsvoid
try to associate each type in the typegroup with a class
-
Field Details
-
typeTable
-
loader
-
resolve
private boolean resolve -
exceptionTypes
-
-
Constructor Details
-
TypeGroup
create a type group for a rule containing all the basic types- Parameters:
loader
- the class loader to use for type resolution
-
-
Method Details
-
lookup
lookup a type by name dereferencing it to its fully qualified type if that exists- Parameters:
name
- the type name- Returns:
- the type
-
create
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
- the type name- Returns:
- the type if created or matched or null if there is an alias mismatch
-
create
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
- the type nameclazz
- the associated class- 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 -
checkAlias
if the supplied type has a package qualified name ensure that any existing entry with the unqualified name is aliased to it or else add an entry with an unqualified name as an alias for it. do nothing if the type name is unqualified- Parameters:
type
- the type to be checked for an alias- Returns:
- true if the alias type is now or was already in the table or false if no such type can be installed because there is an existing alias to some other type
-
createArray
-
addExceptionTypes
-
getExceptionTypes
-
ensureType
-
match
-