Class Node

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.concurrent.atomic.AtomicBoolean defined
      flag of whether we have visit the real node
      used by duplicate class checker
      ClassEntity entity  
      java.util.List<InterfaceNode> interfaces  
      ClassNode parent
      parent class node of this class node
      it could be null when it doesn't exists actually, it's a virtual class node
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FieldEntity confirmOriginField​(java.lang.String name, java.lang.String desc)
      One field of a class may be not defined in this class, it probably is a field inherited from a specific ancestor class.
      MethodEntity confirmOriginMethod​(java.lang.String name, java.lang.String desc)
      One method of a class may be not defined in this class, it probably is a method inherited from a specific ancestor class.
      kotlin.Pair<java.util.Set<ClassNode>,​java.util.Set<InterfaceNode>> getAllChildren​(boolean includeSelf)  
      boolean inheritFrom​(Node node)
      Determines if the class or interface represented by the specified node parameter is either the same as, or is a superclass or superinterface of, the class or interface represented by this node.
      boolean isAssignableFrom​(Node node)
      Determines if the class or interface represented by this node is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified node parameter.
      void read​(com.google.gson.stream.JsonReader jsonReader, com.google.gson.Gson gson)  
      void write​(com.google.gson.stream.JsonWriter jsonWriter, com.google.gson.Gson gson)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • parent

        public ClassNode parent
        parent class node of this class node
        it could be null when it doesn't exists actually, it's a virtual class node
      • defined

        public final transient java.util.concurrent.atomic.AtomicBoolean defined
        flag of whether we have visit the real node
        used by duplicate class checker
    • Method Detail

      • isAssignableFrom

        public final boolean isAssignableFrom​(Node node)
        Determines if the class or interface represented by this node is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified node parameter. It returns true if so;otherwise it returns false. much like return node instanceof this
      • inheritFrom

        public final boolean inheritFrom​(Node node)
        Determines if the class or interface represented by the specified node parameter is either the same as, or is a superclass or superinterface of, the class or interface represented by this node. It returns true if so;otherwise it returns false. much like return this instanceof node
      • confirmOriginMethod

        public MethodEntity confirmOriginMethod​(java.lang.String name,
                                                java.lang.String desc)
        One method of a class may be not defined in this class, it probably is a method inherited from a specific ancestor class. So this method is used to find where the method was really defined.
        Parameters:
        name - method name
        desc - method desc
        Returns:
        If the method with specific 'name' and 'desc' is not found, it would return null.
      • confirmOriginField

        public FieldEntity confirmOriginField​(java.lang.String name,
                                              java.lang.String desc)
        One field of a class may be not defined in this class, it probably is a field inherited from a specific ancestor class. So this method is used to find where the field with specific 'name' and 'desc' is really defined.
        Parameters:
        name - method name
        desc - method desc
        Returns:
        If the method with specific 'name' and 'desc' is not found, it would return null.
      • getAllChildren

        public kotlin.Pair<java.util.Set<ClassNode>,​java.util.Set<InterfaceNode>> getAllChildren​(boolean includeSelf)
      • read

        public void read​(com.google.gson.stream.JsonReader jsonReader,
                         com.google.gson.Gson gson)
                  throws java.io.IOException
        Specified by:
        read in interface Jsonable
        Throws:
        java.io.IOException
      • write

        public void write​(com.google.gson.stream.JsonWriter jsonWriter,
                          com.google.gson.Gson gson)
                   throws java.io.IOException
        Specified by:
        write in interface Jsonable
        Throws:
        java.io.IOException