简体   繁体   中英

How in atg Nucleus validate component

I have read lots of document and everyewhere it mention that in atg for compoent there are some prerequiste.

Ex. Your component class should have one public constructor without argument.

When I was checking in my application for one of the component and I dont see any by default public constructor has mentioned. I know java create default constructor of every class but I have read that for atg compoent you have to mention public constrcutor even if it does nothing.

So I dont know then I how my compoent is created without public constrcutor. My class is extending GenericService and there I can see public constructor so is that the reason this component created because parent class has the constructor. May be this is stupid question but I am still confuse when I create any class in atg should I create public constructor or not.

Thank you.

As you mentioned java will add a default constructor if no constructor is mentioned in class. This default constructor will be public for public class. Hence, any public class with no constructor will be eligible to be an ATG component.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM