Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.patch
Class PatchContext

java.lang.Object
  extended by oracle.javatools.patch.PatchContext
All Implemented Interfaces:
java.lang.Cloneable

public class PatchContext
extends java.lang.Object
implements java.lang.Cloneable

This class represents transient information for how a PatchModel may be applied to a context.

Since:
10.1.3.0.3
See Also:
PatchEngine.matchModel(oracle.javatools.patch.PatchModel, oracle.javatools.patch.PatchMatchOptions)

Constructor Summary
PatchContext()
           
 
Method Summary
 java.lang.Object clone()
          
 int getHunkMatchLine(PatchHunk patchHunk)
          Gets the corresponding matched patch hunk line from the context.
 int getPrefixSlashNumber()
          Gets the number of prefix slashes to strip from each file name.
 boolean isEntryMatched(PatchEntry patchEntry)
          Gets whether the patch entry has been matched against the context.
 void setEntryMatched(PatchEntry patchEntry, boolean matched)
          Sets whether the patch entry has been matched against the context.
 void setHunkMatchLine(PatchHunk patchHunk, int matchLine)
          Sets the corresponding matched patch hunk line from the context.
 void setPrefixSlashNumber(int prefixSlashNumber)
          Sets the number of prefix slashes to strip from each file name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatchContext

public PatchContext()
Method Detail

setPrefixSlashNumber

public void setPrefixSlashNumber(int prefixSlashNumber)
Sets the number of prefix slashes to strip from each file name.

Parameters:
prefixSlashNumber - the number of prefix slashes to strip.

getPrefixSlashNumber

public int getPrefixSlashNumber()
Gets the number of prefix slashes to strip from each file name.

Returns:
the number of prefix slashes to strip.

setEntryMatched

public void setEntryMatched(PatchEntry patchEntry,
                            boolean matched)
Sets whether the patch entry has been matched against the context.

Parameters:
patchEntry - the patch entry.
matched - true if the entry is matched.

isEntryMatched

public boolean isEntryMatched(PatchEntry patchEntry)
Gets whether the patch entry has been matched against the context.

Parameters:
patchEntry - the patch entry.
Returns:
true if the entry is matched.

setHunkMatchLine

public void setHunkMatchLine(PatchHunk patchHunk,
                             int matchLine)
Sets the corresponding matched patch hunk line from the context.

Parameters:
patchHunk - the patch hunk.
matchLine - the matched patch hunk line number, or -1.

getHunkMatchLine

public int getHunkMatchLine(PatchHunk patchHunk)
Gets the corresponding matched patch hunk line from the context.

Parameters:
patchHunk - the patch hunk.
Returns:
the matched patch hunk line number, or -1.

clone

public java.lang.Object clone()

Overrides:
clone in class java.lang.Object
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.