public class UIFactoryTypes extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private Set |
typeNames |
Constructor and Description |
---|
UIFactoryTypes(Set typeNames)
Constructs a
UIFactoryTypes attribute using the
passed Set . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compares the specified object (the
Object passed
in o ) with this UIFactoryTypes
object for equality. |
Set |
getTypeNames()
Returns an unmodifiable Set of fully qualified type name
String s of which
a UI factory is an instance in no particular order. |
int |
hashCode()
Returns the hash code value for this
UIFactoryTypes object. |
boolean |
isAssignableTo(Class classObj)
Returns
true if the UI factory (contained in
marshalled form in the same UIDescriptor ) is
an instance of the UI factory interface
type passed in parameter classObj . |
Iterator |
iterator()
Returns an iterator over the set of types of which
a UI factory object is an instance in no particular order.
|
private static final long serialVersionUID
private Set typeNames
public UIFactoryTypes(Set typeNames)
UIFactoryTypes
attribute using the
passed Set
. The Set
can
be mutable or immutable, and must contain only
String
s. Each String
should
represent a fully qualified Java type name of a UI factory
interface. This constructor copies
the contents of the passed Set
into a
serializable read-only Set
that has a
consistent serialized form across all VMs.
The isAssignableTo
method of this class will only
return true
for types whose names are passed
explicitly to this constructor via the typeNames
parameter.
This constructor does not inspect the inheritance hierarchies of the
types whose names are passed via the typeNames
parameter. It is the client's responsibility to include the name of
every UI factory interface of which the relevant UI factory (the UI factory being described
by this class) is an instance.
typeNames
- A Set
of String
objects. Each element must be non-null and an instance
of java.lang.String
.NullPointerException
- if typeNames
is null
or any element of typeNames
set is null
.IllegalArgumentException
- if any non-null element of
typeNames
set is not an instance of
java.lang.String
.public boolean isAssignableTo(Class classObj)
true
if the UI factory (contained in
marshalled form in the same UIDescriptor
) is
an instance of the UI factory interface
type passed in parameter classObj
.
Else, returns false
.
This method compares the fully qualified name
of the type represented by the passed Class
with
the fully qualified names of UI factory interfaces implemented
by the UI factory's class. If
an exact string match is found, this method returns true
.
If the UI factory is ultimately loaded with a class loader whose
parent-delegation chain doesn't include the class loader
that defined the passed class, a type with the same name
would be loaded into a different namespace of
the virtual machine. If so, the two types would
be considered different by the virtual machine, even though
they shared the same fully qualified name.
classObj
- the type to checktrue
if the UI factory object (once
unmarshalled) can be cast to the type represented by the
passed Class
NullPointerException
- if classObj
is null
public Iterator iterator()
Iterator
does not support
remove()
.public Set getTypeNames()
String
s of which
a UI factory is an instance in no particular order.public boolean equals(Object o)
Object
passed
in o
) with this UIFactoryTypes
object for equality. Returns true if the specified object
is not null, if the specified object's class is
UIFactoryTypes
, if the two sets of
factory types are the same size, and if every factory type mentioned in the
specified UIFactoryTypes
object (passed in o
) is also mentioned
in this UIFactoryTypes
object.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.