Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/make/scripts/genExceptions.sh
32280 views
#! /bin/sh1#2# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4#5# This code is free software; you can redistribute it and/or modify it6# under the terms of the GNU General Public License version 2 only, as7# published by the Free Software Foundation. Oracle designates this8# particular file as subject to the "Classpath" exception as provided9# by Oracle in the LICENSE file that accompanied this code.10#11# This code is distributed in the hope that it will be useful, but WITHOUT12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License14# version 2 for more details (a copy is included in the LICENSE file that15# accompanied this code).16#17# You should have received a copy of the GNU General Public License version18# 2 along with this work; if not, write to the Free Software Foundation,19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.20#21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA22# or visit www.oracle.com if you need additional information or have any23# questions.24#2526# Generate exception classes2728SPEC=$129DST=$23031gen() {32ID=$133WHAT=$234SVUID=$335ARG_TYPE=$436ARG_ID=$537ARG_PROP=$638ARG_PHRASE=$739ARG_PARAM="$ARG_TYPE$ $ARG_ID"40echo '-->' $DST/$ID.java41out=$DST/${ID}.java4243$SH ${SCRIPTS}/addNotices.sh "$COPYRIGHT_YEARS" > $out4445cat >>$out <<__END__4647// -- This file was mechanically generated: Do not edit! -- //4849package $PACKAGE;505152/**$WHAT53*54* @since $SINCE55*/5657public `if [ ${ABSTRACT:-0} = 1 ];58then echo 'abstract '; fi`class $ID59extends ${SUPER}60{6162private static final long serialVersionUID = $SVUID;63__END__6465if [ $ARG_ID ]; then6667cat >>$out <<__END__6869private $ARG_TYPE $ARG_ID;7071/**72* Constructs an instance of this class.73*74* @param $ARG_ID75* The $ARG_PHRASE76*/77public $ID($ARG_TYPE $ARG_ID) {78super(String.valueOf($ARG_ID));79this.$ARG_ID = $ARG_ID;80}8182/**83* Retrieves the $ARG_PHRASE.84*85* @return The $ARG_PHRASE86*/87public $ARG_TYPE get$ARG_PROP() {88return $ARG_ID;89}9091}92__END__9394else9596cat >>$out <<__END__9798/**99* Constructs an instance of this class.100*/101public $ID() { }102103}104__END__105106fi107}108109. $SPEC110111112