Class TargetApplicationClassOrInterfaceRepresentation
java.lang.Object
com.gmail.aydinov.sergey.simple_debugger_plugin.abstraction.TargetApplicationClassOrInterfaceRepresentation
- All Implemented Interfaces:
TargetApplicationElementRepresentation,Cloneable
public class TargetApplicationClassOrInterfaceRepresentation
extends Object
implements TargetApplicationElementRepresentation
Representation of a target application class or interface in the debugged JVM.
Contains information about its methods and fields.
Author: Sergei Aidinov
Email: sergey.aydinov@gmail.com
-
Constructor Summary
ConstructorsConstructorDescriptionTargetApplicationClassOrInterfaceRepresentation(String elementName, TargetApplicationElementType elementType, Set<TargetApplicationMethodDTO> methods, Set<Field> fields) Constructs a new TargetApplicationClassOrInterfaceRepresentation. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a deep copy of this object.Returns the fields of this class or interface.Returns the methods of this class or interface.Returns the name of this element (class or interface).Returns the type of this element (class or interface).Returns a nicely formatted string representing this element.voidsetMethods(Set<TargetApplicationMethodDTO> methods) Sets the methods of this class or interface.
-
Constructor Details
-
TargetApplicationClassOrInterfaceRepresentation
public TargetApplicationClassOrInterfaceRepresentation(String elementName, TargetApplicationElementType elementType, Set<TargetApplicationMethodDTO> methods, Set<Field> fields) Constructs a new TargetApplicationClassOrInterfaceRepresentation.- Parameters:
elementName- the fully qualified name of the class or interfaceelementType- the type (class or interface)methods- the set of methods in this elementfields- the set of fields in this element
-
-
Method Details
-
setMethods
Sets the methods of this class or interface.- Specified by:
setMethodsin interfaceTargetApplicationElementRepresentation- Parameters:
methods- the set of methods
-
getMethods
Returns the methods of this class or interface.- Specified by:
getMethodsin interfaceTargetApplicationElementRepresentation- Returns:
- the set of methods
-
getFields
Returns the fields of this class or interface.- Specified by:
getFieldsin interfaceTargetApplicationElementRepresentation- Returns:
- the set of fields
-
getTargetApplicationElementName
Returns the name of this element (class or interface).- Specified by:
getTargetApplicationElementNamein interfaceTargetApplicationElementRepresentation- Returns:
- the element name
-
getTargetApplicationElementType
Returns the type of this element (class or interface).- Specified by:
getTargetApplicationElementTypein interfaceTargetApplicationElementRepresentation- Returns:
- the element type
-
prettyPrint
Returns a nicely formatted string representing this element.- Specified by:
prettyPrintin interfaceTargetApplicationElementRepresentation- Returns:
- pretty-printed information about methods and fields
-
clone
Creates a deep copy of this object. Methods set is cloned, fields remain the same.- Specified by:
clonein interfaceTargetApplicationElementRepresentation- Overrides:
clonein classObject- Returns:
- a clone of this representation
-