Class JavaCodeUnit

All Implemented Interfaces:
HasDescription, CanBeAnnotated, HasAnnotations<JavaMember>, HasDescriptor, HasModifiers, HasName, HasName.AndFullName, HasOwner<JavaClass>, HasParameterTypes, HasReturnType, HasSourceCodeLocation, HasThrowsClause<JavaCodeUnit>, HasTypeParameters<JavaCodeUnit>
Direct Known Subclasses:
JavaConstructor, JavaMethod, JavaStaticInitializer

public abstract class JavaCodeUnit
extends JavaMember
implements HasParameterTypes, HasReturnType, HasTypeParameters<JavaCodeUnit>, HasThrowsClause<JavaCodeUnit>
Represents a unit of code containing accesses to other units of code. A unit of code can be
  • a method
  • a constructor
  • a static initializer
in particular every place, where Java code with behavior, like calling other methods or accessing fields, can be defined.