Skip to content

Entity kinds

This section explains the general categories of OpenUnderstand entity kinds for different programming languages.

Java

The total number of OpenUnderstand Java entity kinds is 169. Table 1 lists the general categories of Java entity kinds, the kind names, and the kind examples for use with Python. The Visibility term should be replaced with one concrete access modifier terms, including Default, Private, Protected, Public.

General kind keys

  • “Default” is used in kind names for entities with default visibility.
  • “Public” is used in kind names for entities declared as having public visibility.
  • “Protected” is used in kind names for entities declared as having protected visibility.
  • “Private” is used in kind names for entities declared as having private visibility.
  • “Abstract" is used in kind names for classes and methods that are declared as abstract.
  • “Member” is used in kind names for entities that can be class members (for example classes and methods).
  • “Final” is used in kind names for entities declared as final (non-extendable).
  • “Static” is used in kind names for entities declared as static.
  • “Type” is used in kind names for classes and interfaces.

Table 1. Java entity kinds details

Entity kind full name Description Example code snippet
Java File A source file written in Java (.java file). File entity kinds do not have any parent. SomeFile.java
Java File Jar A source file from a Java ARchive file (.jar File). SomeJavaARchive.jar
Java Method Constructor Member Visibility A constructor. Visibility may be Default, Public, Protected, or Private. For example, some_class in the following example has a kind of Java Constructor with Default visibility. class some_class { some_class() { // constructor ... }
Java Static Final Method Visibility Member A static final (non-extendable) method. Visibility may be Default, Public, Protected, or Private. For example, some_meth in the following example has a kind of Java Static Final Method Private Member. private static final int some_meth() { ... }
Java Static Final Generic Method Visibility Member Todo: Todo:
Java Final Method Visibility Member A final (non-extendable) method. Visibility may be Default, Public, Protected, or Private. For example, some_meth in the following example has a kind of Java Final Method Private Member. private final int some_meth() { ... }
Java Generic Final Method Visibility Member A generic final (non-extendable) method. Todo:
Java Final Generic Method Visibility Member Todo: Todo:
Java Static Method Visibility Member A static method. Visibility may be Default, Public, Protected, or Private. For example, some_meth in the following example has a kind of Java Static Method Private Member. private static int some_meth() { ... }
Java Static Method Public Main Member A Java “main” method. This is always public and static. For example, main method in the following example has a kind of Java Static Method Public Main Member. public static main(String[] args) { ... }
Java Method Visibility Member A method. Visibility may be Default, Public, Protected, or Private. For example, some_meth in the following example has a kind of Java Method Private Member. private int some_meth() { ... }
Java Abstract Method Visibility Member An abstract method. Visibility may be Default, Public, Protected, or Private. For example, some_meth in the following example has a kind of Java Abstract Method Protected Member. protected abstract int some_meth();
Java Abstract Generic Method Visibility Member Todo: Todo:
Java Unknown Method Member An unknown entity which from context can be identified as a method.
Java Unresolved Method A method reference that was not linked up to a declaration in the resolve process. Should not occur.
Java Unresolved External Static Final Method Visibility Member Todo:
Java Unresolved External Final Method Visibility Member
Java Unresolved External Static Method Visibility Member
Java Module Todo: Todo:
Java Unknown Module Todo: Todo:
Java Unresolved Module Todo: Todo:
Java Package A Java package. For example, some_pack in the following example has a kind of Java Package. Important note: The default unnamed package has a kind of Java Package Unnamed. An unnamed package entity is created if any files in the project do not have a “package” statement. Any class that appears in a file without a “package” statement belongs to the unnamed package. package some_pack;
Java Unknown Package An unknown entity which from context can be identified as a package.
Java Unresolved Package
Java Parameter A Java method parameter. For example, a_param in the following example has a kind of Java Parameter. void some_meth(int a_param) { ... }
Java Catch Parameter Parameter in a Java catch clause. For example, some_exception in the following example has a kind of Java Catch Parameter. catch (some_exception e) { ... }
Java Abstract Class Type Visibility Member An abstract class. Visibility may be Default, Public, Protected, or Private. For example, some_class in the following example has a kind of Java Abstract Class Type Private Member. private abstract class some_class { ... }
Java Abstract Generic Class Type Visibility Member
Java Static Abstract Class Type Visibility Member A static abstract class. Visibility may be Default, Public, Protected, or Private. For example, some_class in the following example has a kind of Java Static Abstract Class Type Private Member. private static abstract class some_class { ... }
Java Static Abstract Generic Class Type Visibility Member Todo:
Java Abstract Enum Type Visibility Member Todo:
Java Annotation Interface Type Visibility Todo:
Java Class Type Anonymous Member An anonymous class. A unique name of the form (Anon-1), (Anon-2), etc. is given to each anonymous class. For example: some_class some_meth() { return new some_class() { // creates anonymous class ... } }
Java Class Type Visibility Member A class. Visibility may be Default, Public, Protected, or Private. For example, some_class in the following example has a kind of Java Class Type Public Member. public class some_class { ... }
Java Generic Class Type Visibility Member A generic class. Visibility may be Default, Public, Protected, or Private. For example, some_class in the following example has a kind of Java Class Type Public Member. public class<T> some_class { ... }
Java Enum Class Type Visibility Member Todo: Todo:
Java Final Class Type Visibility Member A final (non-extendable) class. Visibility may be Default, Public, Protected, or Private. For example, some_class in the following example has a kind of Java Final Class Type Protected Member. protected final class some_class { ... }
Java Final Generic Class Type Visibility Member Todo:
Java Static Class Type Visibility Member A static class. Visibility may be Default, Public, Protected, or Private. For example, some_class in the following example has a kind of Java Static Class Type Private Member. private static class some_class { ... }
Java Static Final Class Type Visibility Member A static final class. Visibility may be Default, Public, Protected, or Private. For example, some_class in the following example has a kind of Java Static Final Class Type Private Member. private static final class some_class { ... }
Java Static Generic Class Type Visibility Member Todo: Todo:
Java Static Final Generic Class Type Visibility Member Todo: Todo:
Java Generic Interface Type Visibility Todo: Todo:
Java Unknown Class Type Member An unknown entity which from context can be identified as a class.
Java Unresolved Type A type reference that was not linked up to a declaration in the resolve process. Should not occur.
Java Static Final Variable Visibility Member A static final class member variable (field). Visibility may be Default, Public, Protected, or Private. For example, some_constant in the following example has a kind of Java Static Final Variable Private Member. class some_class { private static final int some_constant = 5; }
Java Static Variable Visibility Member A static class member variable (field). Visibility may be Default, Public, Protected, or Private. For example, some_constant in the following example has a kind of Java Static Variable Private Member. class some_class { private static int some_constant = 5; }
Java Final Variable Visibility Member A final class member variable (field). Visibility may be Default, Public, Protected, or Private. For example, some_constant in the following example has a kind of Java Final Variable Private Member. class some_class { private final int some_constant = 5; }
Java Variable Visibility Member A class member variable (field). Visibility may be Default, Public, Protected, or Private. For example, some_var in the following example has a kind of Java Variable Private Member. class some_class { private int some_var = 5; }
Java Variable Local A local variable. For example, some_var in the following example has a kind of Java Variable Local. int some_meth() { int some_var = 5; }
Java Final Variable Local A final local variable. For example, some_constant in the following example has a kind of Java Final Variable Local. int some_meth() { final int some_constant = 5; }
Java Implicit Final Variable Public Member Todo: Todo:
Java Variable EnumConstant Public Member Todo: Todo:
Java Unknown Variable Member An unknown entity which from context can be identified as a variable.
Java Unresolved Variable A variable reference that was not linked up to a declaration in the resolve process. Should not occur.
Java Unused An entity from the standard src.jar or rt.jar that is not used by or required by any files in the project. To filter out these entities, use “~unused” in queries to select Java entities. For example, udbKindParse(“java class ~unused”) will select all classes that are part of the project or required by files in the project.

References

[1] SciTools, “Understand,” 2020. https://www.scitools.com/ (accessed Sep. 11, 2020).