Package jadx.api

Class JavaClass

java.lang.Object
jadx.api.JavaClass
All Implemented Interfaces:
JavaNode

public final class JavaClass extends Object implements JavaNode
  • Field Details

  • Constructor Details

  • Method Details

    • getCode

      public String getCode()
    • getCodeInfo

      @NotNull public @NotNull ICodeInfo getCodeInfo()
    • decompile

      public void decompile()
    • loadingWouldRequireDecompilation

      public boolean loadingWouldRequireDecompilation()
      Detect if calling load() would trigger a potentially expensive decompilation operation.
    • reload

      public ICodeInfo reload()
    • unload

      public void unload()
    • isNoCode

      public boolean isNoCode()
    • isInner

      public boolean isInner()
    • getSmali

      public String getSmali()
    • isOwnCodeAnnotation

      public boolean isOwnCodeAnnotation(ICodeAnnotation ann)
      Specified by:
      isOwnCodeAnnotation in interface JavaNode
    • getCodeNodeRef

      public ICodeNodeRef getCodeNodeRef()
      Specified by:
      getCodeNodeRef in interface JavaNode
    • getClassNode

      @Internal public ClassNode getClassNode()
      Internal API. Not Stable!
    • load

      @Nullable private @Nullable ICodeInfo load()
      Decompile class and loads internal lists of fields, methods, etc. Do nothing if already loaded.
      Returns:
      code info if decompilation was executed, null otherwise
    • loadLists

      private void loadLists()
    • getRootDecompiler

      JadxDecompiler getRootDecompiler()
    • getAnnotationAt

      @Nullable public @Nullable ICodeAnnotation getAnnotationAt(int pos)
    • getUsageMap

      public Map<Integer,JavaNode> getUsageMap()
    • getUsePlacesFor

      public List<Integer> getUsePlacesFor(ICodeInfo codeInfo, JavaNode javaNode)
    • getUseIn

      public List<JavaNode> getUseIn()
      Specified by:
      getUseIn in interface JavaNode
    • getSourceLine

      public Integer getSourceLine(int decompiledLine)
    • getName

      public String getName()
      Specified by:
      getName in interface JavaNode
    • getFullName

      public String getFullName()
      Specified by:
      getFullName in interface JavaNode
    • getRawName

      public String getRawName()
    • getPackage

      public String getPackage()
    • getJavaPackage

      public JavaPackage getJavaPackage()
    • getDeclaringClass

      @Nullable public @Nullable JavaClass getDeclaringClass()
      Specified by:
      getDeclaringClass in interface JavaNode
    • getOriginalTopParentClass

      public JavaClass getOriginalTopParentClass()
    • getTopParentClass

      public JavaClass getTopParentClass()
      Return top parent class which contains code of this class. Code parent can be different from original parent after move or inline
      Specified by:
      getTopParentClass in interface JavaNode
      Returns:
      this if already a top class
    • getCodeParent

      @Nullable public @Nullable JavaClass getCodeParent()
      Return parent class which contains code of this class. Code parent can be different for original parent after move or inline
    • getAccessInfo

      public AccessInfo getAccessInfo()
    • getInnerClasses

      public List<JavaClass> getInnerClasses()
    • getInlinedClasses

      public List<JavaClass> getInlinedClasses()
    • getFields

      public List<JavaField> getFields()
    • getMethods

      public List<JavaMethod> getMethods()
    • searchMethodByShortId

      @Nullable public @Nullable JavaMethod searchMethodByShortId(String shortId)
    • getDependencies

      public List<JavaClass> getDependencies()
    • getTotalDepsCount

      public int getTotalDepsCount()
    • removeAlias

      public void removeAlias()
      Specified by:
      removeAlias in interface JavaNode
    • getDefPos

      public int getDefPos()
      Specified by:
      getDefPos in interface JavaNode
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object