/* * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions.
*/
Long WLong = newLong(Long.MAX_VALUE);
SimpleType WLongType = SimpleType.LONG; Long getWLong(); void setWLong(Long x); Long opWLong(Long x, Long y);
Short WShort = newShort(Short.MAX_VALUE);
SimpleType WShortType = SimpleType.SHORT; Short getWShort(); void setWShort(Short x); Short opWShort(Short x, Short y);
Character WCharacter = new Character('x');
SimpleType WCharacterType = SimpleType.CHARACTER;
Character getWCharacter(); void setWCharacter(Character x);
Character opWCharacter(Character x, Character y);
/* Testing that we can use a public no-arg constructor plus a setter * for every getter to reconstruct this object. Note that the * constructor-guessing logic is no longer valid for this class, * so if we can reconstruct it it must be because of the setters.
*/ publicstaticclass GetSetBean { public GetSetBean() { this(0, null, null);
}
publicboolean equals(Object o) { if (!(o instanceof GetSetBean)) returnfalse;
GetSetBean b = (GetSetBean) o; return (b.Int == Int &&
b.string.equals(string) &&
Arrays.equals(b.stringArray, stringArray));
}
String string;
String[] stringArray; intInt;
}
publicstaticinterface GetterInterface { public String[] getStrings(); publicint[] getInts(); publicboolean isWhatsit(); public GetSetBean getGetSet();
// We uselessly mention the public methods inherited from Object because // they should not prevent the interface from being translatable. // We could consider encoding the result of hashCode() and toString() // on the original object that implements this interface into the // generated CompositeData and referencing that in the proxy, but // that seems ambitious for now. Doing it only if hashCode() and/or // toString() are mentioned in the interface is a possibility but // a rather abstruse one. publicboolean equals(Object o); publicint hashCode(); public String toString();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.