Class XmlMethod
java.lang.Object
org.eolang.jeo.representation.xmir.XmlMethod
XML method.
- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
access()
Method access modifiers.Method annotations.defvalue()
Annotation default value.Method descriptor.final List<XmlBytecodeEntry>
instructions
(Predicate<XmlBytecodeEntry>... predicates) All instructions.boolean
Checks if method is a constructor.maxs()
Method max stack and locals.name()
Method name.nodes()
All the method instructions.Method properties as bytecode.Method signature.org.xembly.Directives
Method trycatch entries.withInstructions
(XmlNode... entries) Method instructions.Clear instructions.Clear max stack and max locals.
-
Constructor Details
-
XmlMethod
public XmlMethod()Constructor. -
XmlMethod
Constructor.- Parameters:
name
- Method name.
-
XmlMethod
Constructor.- Parameters:
name
- Method name.access
- Access modifiers.descriptor
- Method descriptor.exceptions
- Method exceptions.
-
XmlMethod
public XmlMethod(int stack, int locals) Constructor.- Parameters:
stack
- Max stack.locals
- Max locals.
-
XmlMethod
Constructor.- Parameters:
xmlnode
- Method node.
-
-
Method Details
-
name
Method name.- Returns:
- Name.
-
access
public int access()Method access modifiers.- Returns:
- Access modifiers.
-
descriptor
Method descriptor.- Returns:
- Descriptor.
-
signature
Method signature.- Returns:
- Signature.
-
maxs
Method max stack and locals.- Returns:
- Maxs.
-
trycatchEntries
Method trycatch entries.- Returns:
- Trycatch entries.
-
properties
Method properties as bytecode.- Returns:
- Properties.
-
isConstructor
public boolean isConstructor()Checks if method is a constructor.- Returns:
- True if method is a constructor.
-
instructions
@SafeVarargs public final List<XmlBytecodeEntry> instructions(Predicate<XmlBytecodeEntry>... predicates) All instructions.- Parameters:
predicates
- Predicates to filter instructions.- Returns:
- Instructions.
-
nodes
All the method instructions.- Returns:
- Instructions.
-
annotations
Method annotations.- Returns:
- Annotations.
-
withoutMaxs
Clear max stack and max locals.- Returns:
- Copy of the method without max stack and max locals.
-
withInstructions
Method instructions.- Parameters:
entries
- Instructions to add.- Returns:
- Copy of the method with added instructions.
-
withoutInstructions
Clear instructions.- Returns:
- Method without instructions.
-
toDirectives
public org.xembly.Directives toDirectives() -
defvalue
Annotation default value.- Returns:
- Optional XMIR of the default value.
-