Use of a custom class

Hi there.
I would like to use a custom java class within the framework. The class is very simple and deals with enabling/disabling fields. I then created a java file and wrote the code. What should I do to be able to inject it and use it in various parts of the project? Sorry if the question may seem trivial.
greetings

Hi, you probably want to create a Java Bean Infrastructure Interfaces - CUBA Platform. Developer’s Manual