3 # Copyright (c) 2014 Intel Corporation. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
8 """Python class represents static field of a java class"""
9 def __init__(self, field_type, name, value, doc):
10 self._field_type = field_type
11 self._field_name = name
12 self._field_value = value
17 return self._field_type
21 return self._field_name
24 def field_value(self):
25 return self._field_value
29 return self._field_doc
33 """Python class represents enum type in a java class"""
34 def __init__(self, name, declaration, doc):
35 self._enum_name = name
36 self._enum_declaration = declaration
41 return self._enum_name
44 def enum_declaration(self):
45 return self._enum_declaration
51 def EnumClassName(self):
52 # return the variable name of the class<?> object for this enum
53 # type in parent class.
54 return 'enum%sClass' % self._enum_name.replace('Internal', '')
56 def EnumMethodValueOfName(self):
57 # return the variable name of the Method object for this enum
58 # type's valueOf method in parent class.
59 return '%sValueOfMethod' % self.EnumClassName()