AccessorTest.stg revision 2b8845bb247e3e5ee154966866b53fa9887e2609
1decl(type, name, value) ::= "<type> <name><init(value)>;" 2init(v) ::= "<if(v)> = <v><endif>" 3 4field_decl(type) ::= "private <type.name> <type.name>_val;" 5 6preinc_template(type) ::= "++<type.name>_val;" 7postinc_template(type) ::= "<type.name>_val++;" 8predec_template(type) ::= "--<type.name>_val;" 9postdec_template(type) ::= "<type.name>_val--;" 10add_template(type) ::= "<type.name>_val += val;" 11sub_template(type) ::= "<type.name>_val -= val;" 12mul_template(type) ::= "<type.name>_val *= val;" 13div_template(type) ::= "<type.name>_val /= val;" 14rem_template(type) ::= "<type.name>_val %= val;" 15and_template(type) ::= "<type.name>_val &= val;" 16or_template(type) ::= "<type.name>_val |= val;" 17xor_template(type) ::= "<type.name>_val ^= val;" 18shl_template(type) ::= "<type.name>_val \<\<= val;" 19shr_template(type) ::= "<type.name>_val >>= val;" 20ushr_template(type) ::= "<type.name>_val >>>= val;" 21 22operation_template_name(operation) ::= "<operation.name>_template" 23 24binary_method(input, type, binary_operation) ::= << 25public void <type.name>_<binary_operation.name>(<input> val) { 26 <(operation_template_name(binary_operation))(type)> 27} 28>> 29 30binary_methods(binary_operation, type) ::= << 31<binary_operation.inputTypes:binary_method(type, binary_operation);separator="\n\n"> 32>> 33 34unary_method(unary_operation, type) ::= << 35public void <type.name>_<unary_operation.name>() { 36 <(operation_template_name(unary_operation))(type)> 37} 38>> 39 40type_methods(type) ::= << 41<[type.unaryOperations:unary_method(type), type.binaryOperations:binary_methods(type)];separator="\n\n"> 42>> 43 44 45file(types) ::= << 46/* 47 * Copyright 2012, Google Inc. 48 * All rights reserved. 49 * 50 * Redistribution and use in source and binary forms, with or without 51 * modification, are permitted provided that the following conditions are 52 * met: 53 * 54 * * Redistributions of source code must retain the above copyright 55 * notice, this list of conditions and the following disclaimer. 56 * * Redistributions in binary form must reproduce the above 57 * copyright notice, this list of conditions and the following disclaimer 58 * in the documentation and/or other materials provided with the 59 * distribution. 60 * * Neither the name of Google Inc. nor the names of its 61 * contributors may be used to endorse or promote products derived from 62 * this software without specific prior written permission. 63 * 64 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 65 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 66 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 67 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 68 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 69 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 70 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 71 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 72 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 73 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 74 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 75 */ 76 77package org.jf.dexlib2; 78 79public class AccessorTypes { 80 <types:field_decl();separator="\n"> 81 82 private class Accessors { 83 <types:type_methods();separator="\n\n"> 84 } 85} 86>> 87