Class XmlClass
- java.lang.Object
-
- org.eolang.jeo.representation.xmir.XmlClass
-
public final class XmlClass extends Object
XML class.- Since:
- 0.1
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<XmlMethod>constructors()Retrieve all constructors from XMIR.List<XmlField>fields()Fields.voidinline(XmlMethod method)Try to inline method into all possible places.List<XmlMethod>methods()Methods.Stringname()Class name.Nodenode()Internal XML node.voidreplaceArguments(String old, String replacement)Replace all instruction arguments that have "old" value with "replacement".voidwithConstructor(XmlMethod method)Add constructor.XmlClasswithField(XmlField field)Add field.XmlClasswithName(String name)Set class name in XML.
-
-
-
Constructor Detail
-
XmlClass
public XmlClass(Node xml)
Constructor.- Parameters:
xml- Class node.
-
-
Method Detail
-
constructors
public List<XmlMethod> constructors()
Retrieve all constructors from XMIR.- Returns:
- List of constructors.
-
withName
public XmlClass withName(String name)
Set class name in XML.- Parameters:
name- Name of the Class.- Returns:
- Class.
-
withField
public XmlClass withField(XmlField field)
Add field.- Parameters:
field- Field.- Returns:
- The same class.
-
withConstructor
public void withConstructor(XmlMethod method)
Add constructor.- Parameters:
method- Constructor.
-
node
public Node node()
Internal XML node.- Returns:
- Internal XML node.
-
inline
public void inline(XmlMethod method)
Try to inline method into all possible places.- Parameters:
method- Other method.
-
replaceArguments
public void replaceArguments(String old, String replacement)
Replace all instruction arguments that have "old" value with "replacement".- Parameters:
old- Old value.replacement- Replacement value.
-
name
public String name()
Class name.- Returns:
- Name.
-
-