java.lang.Object
edu.university.ecs.lab.common.models.ir.ProjectFile
edu.university.ecs.lab.common.models.ir.JClass
All Implemented Interfaces:
JsonSerializable

public class JClass extends ProjectFile implements JsonSerializable
Represents a class in Java. It holds all information regarding that class including all method declarations, method calls, fields, etc.
  • Field Details

    • packageName

      private String packageName
    • implementedTypes

      private Set<String> implementedTypes
      Class implementations
    • classRole

      private ClassRole classRole
      Role of the class in the microservice system. See ClassRole
    • methods

      private Set<Method> methods
      Set of methods in the class
    • fields

      private Set<Field> fields
      Set of class fields
    • annotations

      private Set<Annotation> annotations
      Set of class level annotations
    • methodCalls

      private List<MethodCall> methodCalls
      List of method invocations made from within this class
  • Constructor Details

  • Method Details

    • toJsonObject

      public com.google.gson.JsonObject toJsonObject()
      Specified by:
      toJsonObject in interface JsonSerializable
      Overrides:
      toJsonObject in class ProjectFile
      Returns:
      a JsonObject representing this
    • getEndpoints

      public Set<Endpoint> getEndpoints()
      This method returns all endpoints found in the methods of this class, grouped under the same list as an Endpoint is an extension of a Method see Endpoint
      Returns:
      set of all endpoints
    • getRestCalls

      public List<RestCall> getRestCalls()
      This method returns all restCalls found in the methodCalls of this class, grouped under the same list as an RestCall is an extension of a MethodCall see RestCall
      Returns:
      set of all restCalls
    • updateMicroserviceName

      public void updateMicroserviceName(String name)
      If we are adding a class or a class is being adopted/orphanized lets update ms name
      Parameters:
      name -