|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.api.pipe.TubeCloner
com.sun.xml.ws.api.pipe.PipeCloner
com.sun.xml.ws.api.pipe.PipeClonerImpl
public class PipeClonerImpl
Clones the whole pipeline.
Since Pipe
s may form an arbitrary directed graph, someone needs
to keep track of isomorphism for a clone to happen correctly. This class
serves that role.
Field Summary |
---|
Fields inherited from class com.sun.xml.ws.api.pipe.TubeCloner |
---|
master2copy |
Constructor Summary | |
---|---|
|
PipeClonerImpl()
|
protected |
PipeClonerImpl(Map<Object,Object> master2copy)
|
Method Summary | ||
---|---|---|
void |
add(AbstractTubeImpl original,
AbstractTubeImpl copy)
Disambiguation version. |
|
void |
add(Pipe original,
Pipe copy)
The Pipe version of add(Tube, Tube) . |
|
void |
add(Tube original,
Tube copy)
This method must be called from within the copy constructor to notify that the copy was created. |
|
|
copy(T p)
Pipe version of copy(Tube) |
|
|
copy(T t)
Invoked by a Tube#copy(TubeClonerImpl) implementation
to copy a reference to another pipe. |
Methods inherited from class com.sun.xml.ws.api.pipe.PipeCloner |
---|
clone |
Methods inherited from class com.sun.xml.ws.api.pipe.TubeCloner |
---|
clone |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PipeClonerImpl()
protected PipeClonerImpl(Map<Object,Object> master2copy)
Method Detail |
---|
public <T extends Pipe> T copy(T p)
Pipe
version of copy(Tube)
copy
in class PipeCloner
public void add(Pipe original, Pipe copy)
Pipe
version of add(Tube, Tube)
.
add
in class PipeCloner
public void add(AbstractTubeImpl original, AbstractTubeImpl copy)
public void add(Tube original, Tube copy)
TubeCloner
When your pipe has references to other pipes, it's particularly important to call this method before you start copying the pipes you refer to, or else there's a chance of inifinite loop.
add
in class TubeCloner
public <T extends Tube> T copy(T t)
TubeCloner
Tube#copy(TubeClonerImpl)
implementation
to copy a reference to another pipe.
This method is for Tube
implementations, not for users.
If the given tube is already copied for this cloning episode, this method simply returns that reference. Otherwise it copies a tube, make a note, and returns a copied tube. This additional step ensures that a graph is cloned isomorphically correctly.
(Think about what happens when a graph is A->B, A->C, B->D, and C->D if you don't have this step.)
copy
in class TubeCloner
t
- The tube to be copied.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |