I have a Java class with two constructors. One accepts a string and 2 vectors, the other accepts a string and a vector.
My question is simply this. How can I tell what constructor has been used to create my object?
I need to know because I only want to call a certain function if the second constructor has been used.
Code:
/* Constructor 1 */
public P(String[] pSL, Vector pHd) {
}
/* Constructor 2 */
public P(String[] pSL, Vector pHd, Vector pBd) {
}
My question is simply this. How can I tell what constructor has been used to create my object?
I need to know because I only want to call a certain function if the second constructor has been used.