My Project
printjava.hh
Go to the documentation of this file.
1 /* ###
2  * IP: GHIDRA
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
18 
19 #ifndef __PRINTJAVA__
20 #define __PRINTJAVA__
21 
22 #include "printc.hh"
23 
29  static PrintJavaCapability printJavaCapability;
30  PrintJavaCapability(void);
32  PrintJavaCapability &operator=(const PrintJavaCapability &op);
33 public:
35 };
36 
55 class PrintJava : public PrintC {
56  static OpToken instanceof;
57  static bool isArrayType(const Datatype *ct);
58  static bool needZeroArray(const Varnode *vn);
59  virtual void printUnicode(ostream &s,int4 onechar) const;
60 public:
61  PrintJava(Architecture *g,const string &nm="java-language");
62  virtual void pushTypeStart(const Datatype *ct,bool noident);
63  virtual void pushTypeEnd(const Datatype *ct);
64  virtual bool doEmitWideCharPrefix(void) const { return false; }
65  virtual void adjustTypeOperators(void);
66  virtual void opLoad(const PcodeOp *op);
67  virtual void opStore(const PcodeOp *op);
68  virtual void opCallind(const PcodeOp *op);
69  virtual void opCpoolRefOp(const PcodeOp *op);
70 };
71 #endif
The base datatype class for the decompiler.
Definition: type.hh:62
virtual bool doEmitWideCharPrefix(void) const
Return true if this language requires a prefix when expressing wide characters.
Definition: printjava.hh:64
The java-language token emitter.
Definition: printjava.hh:55
A token representing an operator in the high-level language.
Definition: printlanguage.hh:81
Lowest level operation of the p-code language.
Definition: op.hh:58
Manager for all the major decompiler subsystems.
Definition: architecture.hh:117
The c-language token emitter.
Definition: printc.hh:63
A low-level variable or contiguous set of bytes described by an Address and a size.
Definition: varnode.hh:65
Factory and static initializer for the "java-language" back-end to the decompiler.
Definition: printjava.hh:28
virtual PrintLanguage * buildLanguage(Architecture *glb)
Build the main PrintLanguage object corresponding to this capability.
Definition: printjava.cc:31
The base class API for emitting a high-level language.
Definition: printlanguage.hh:134
Base class for high-level language capabilities.
Definition: printlanguage.hh:39
Classes to support the c-language back-end of the decompiler.