|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdiff.XMLToAPI
Creates an API object from an XML file. The API object is the internal representation of an API. All methods in this class for populating an API object are static. See the file LICENSE.txt for copyright details.
Field Summary | |
static boolean |
validateXML
If set, validate the XML which represents an API. |
Method Summary | |
static void |
addClass(java.lang.String name,
java.lang.String parent,
boolean isAbstract,
jdiff.Modifiers modifiers)
Create a new class and add it to the current package. |
static void |
addCtor(java.lang.String type,
jdiff.Modifiers modifiers)
Add a constructor to the current class. |
static void |
addException(java.lang.String name,
java.lang.String type,
java.lang.String currElement)
Add an exception to the current method or constructor. |
static void |
addField(java.lang.String name,
java.lang.String type,
boolean isTransient,
boolean isVolatile,
java.lang.String value,
jdiff.Modifiers modifiers)
Add a field to the current class. |
static void |
addImplements(java.lang.String name)
Add an inherited interface to the current class. |
static void |
addInheritedElements()
Add the inherited methods and fields to each class in turn. |
static void |
addInheritedElements(jdiff.ClassAPI child,
jdiff.ClassAPI parent,
java.lang.String fqParentName)
Add all the inherited methods and fields in the second class to the first class, marking them as inherited from the second class. |
static void |
addInterface(java.lang.String name,
java.lang.String parent,
boolean isAbstract,
jdiff.Modifiers modifiers)
Add an new interface and add it to the current package. |
static void |
addMethod(java.lang.String name,
java.lang.String returnType,
boolean isAbstract,
boolean isNative,
boolean isSynchronized,
jdiff.Modifiers modifiers)
Add a method to the current class. |
static void |
addPackage(java.lang.String name)
Create a new package and add it to the API. |
static void |
addParam(java.lang.String name,
java.lang.String type)
Add a parameter to the current method. |
static void |
nameAPI(java.lang.String name)
Set the name of the API object. |
static API |
readFile(java.lang.String filename,
boolean createGlobalComments,
java.lang.String apiName)
Read the file where the XML representing the API is stored. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean validateXML
Method Detail |
public static API readFile(java.lang.String filename, boolean createGlobalComments, java.lang.String apiName)
filename
- The full name of the file containing the XML
representing the APIapiName
- The simple name of the API file. If -oldapidir and
-newapidir are not used, then this is the same as
the filename parameterpublic static void addInheritedElements()
public static void addInheritedElements(jdiff.ClassAPI child, jdiff.ClassAPI parent, java.lang.String fqParentName)
public static void nameAPI(java.lang.String name)
name
- The name of the package.public static void addPackage(java.lang.String name)
name
- The name of the package.public static void addClass(java.lang.String name, java.lang.String parent, boolean isAbstract, jdiff.Modifiers modifiers)
name
- The name of the class.parent
- The name of the parent class, null if no class is extended.modifiers
- Modifiers for this class.public static void addInterface(java.lang.String name, java.lang.String parent, boolean isAbstract, jdiff.Modifiers modifiers)
name
- The name of the interface.parent
- The name of the parent interface, null if no
interface is extended.public static void addImplements(java.lang.String name)
name
- The name of the inherited interface.public static void addCtor(java.lang.String type, jdiff.Modifiers modifiers)
type
- The type of the constructor.modifiers
- Modifiers for this constructor.public static void addMethod(java.lang.String name, java.lang.String returnType, boolean isAbstract, boolean isNative, boolean isSynchronized, jdiff.Modifiers modifiers)
name
- The name of the method.returnType
- The return type of the method, null if it is void.modifiers
- Modifiers for this method.public static void addField(java.lang.String name, java.lang.String type, boolean isTransient, boolean isVolatile, java.lang.String value, jdiff.Modifiers modifiers)
name
- The name of the field.type
- The type of the field, null if it is void.modifiers
- Modifiers for this field.public static void addParam(java.lang.String name, java.lang.String type)
name
- The name of the parameter.type
- The type of the parameter, null if it is void.public static void addException(java.lang.String name, java.lang.String type, java.lang.String currElement)
name
- The name of the parameter.type
- The type of the parameter.
May be null in JDiff1.0.8 and earlier versions.currElement
- Name of the current element.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |