Hello

I stumbled upon this piece of code in JavaSource:

    public void newBeanProperty(JavaQName pType, String pName) {
        String upperCaseName = Character.toUpperCase(pName.charAt(0)) + 
pName.substring(1);
        if (JavaQNameImpl.VOID.equals(pType)) {
                newBeanProperty(pType, pName, "is" + upperCaseName, "set" 
+ upperCaseName);
        } else {
                newBeanProperty(pType, pName, "get" + upperCaseName, "set" 
+ upperCaseName);
        }
    }

and I'm a bit clueless as what this means. In which cases is it valid to 
have 'void' as the type of a property? As bean properties are java fields, 
i.e. instance variables and 'void' is an invalid type for a variable. So 
how could this ever be?

Of course, the method could be fed with an invalid type, but then it 
should throw an exception or silently ignore it, not generate a different 
valid looking piece of code.

I can only assume boolean is meant here ?
Could you please give me a hint why it is made this way and in what case 
it is used? It looks so much as being made on purpose.

Thanks.

:Frederic:

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to