|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.fikin.classmarshaling.util.NamePrefixedClassSelector
public class NamePrefixedClassSelector
Select classes based on list of prefixes.
If the class name is one of those prefixes it will be reported for
serialization.
In all other cases it will report it not.
Example: in the following example will all classes which belong
to "mypkg" class hierarchy and the class "mycls" will be selected,
all other classes not:
created on Aug 2, 2005
Selector selector = new NamePrefixedClassSelector();
selector.setPrefixes( { "mypkg", "mycls" } );
MarshaledObject mo = new MarshaledObject( myObj, selector );
// not serialize the "mo" instead of "myObj"
Constructor Summary | |
---|---|
NamePrefixedClassSelector()
instantiate the object with empty list of prefixes |
|
NamePrefixedClassSelector(java.util.Collection prefixes)
instantiate the object with given list of prefixes |
|
NamePrefixedClassSelector(java.lang.String[] prefixes)
instantiate the object with given list of prefixes |
Method Summary | |
---|---|
boolean |
isClassToBeMarshaled(java.lang.Class cl)
check if the class name is part of the list of class prefixes. |
void |
setPrefixes(java.util.Collection prefixes)
set the list of prefixes |
void |
setPrefixes(java.lang.String[] prefixes)
set the list of prefixes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamePrefixedClassSelector()
public NamePrefixedClassSelector(java.lang.String[] prefixes)
prefixes
- to usepublic NamePrefixedClassSelector(java.util.Collection prefixes)
prefixes
- to useMethod Detail |
---|
public void setPrefixes(java.util.Collection prefixes)
prefixes
- to usepublic void setPrefixes(java.lang.String[] prefixes)
prefixes
- to usepublic boolean isClassToBeMarshaled(java.lang.Class cl)
isClassToBeMarshaled
in interface ClassSelector
cl
- is the class to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |