IKVM11
11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
Attribute.cs
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2010 Jeroen Frijters
3
4
This software is provided 'as-is', without any express or implied
5
warranty. In no event will the authors be held liable for any damages
6
arising from the use of this software.
7
8
Permission is granted to anyone to use this software for any purpose,
9
including commercial applications, and to alter it and redistribute it
10
freely, subject to the following restrictions:
11
12
1. The origin of this software must not be misrepresented; you must not
13
claim that you wrote the original software. If you use this software
14
in a product, an acknowledgment in the product documentation would be
15
appreciated but is not required.
16
2. Altered source versions must be plainly marked as such, and must not be
17
misrepresented as being the original software.
18
3. This notice may not be removed or altered from any source distribution.
19
20
Jeroen Frijters
21
jeroen@frijters.net
22
23
*/
24
25
using
System.Linq;
26
using
System.Xml.Linq;
27
28
namespace
IKVM.Tools.Importer.MapXml
29
{
30
31
public
sealed
class
Attribute
:
MapXmlElement
32
{
33
39
public
static
Attribute
Read
(XElement element)
40
{
41
var attribute =
new
Attribute
();
42
Load
(attribute, element);
43
return
attribute;
44
}
45
51
public
static
void
Load
(
Attribute
attribute, XElement element)
52
{
53
Load
((
MapXmlElement
)attribute, element);
54
attribute.Type = (string)element.Attribute(
"type"
);
55
attribute.Class = (string)element.Attribute(
"class"
);
56
attribute.Sig = (string)element.Attribute(
"sig"
);
57
attribute.Params = element.Elements(
MapXmlSerializer
.
NS
+
"parameter"
).Select(
Parameter
.
Read
).ToArray();
58
attribute.Properties = element.Elements(
MapXmlSerializer
.
NS
+
"property"
).Select(
Parameter
.
Read
).ToArray();
59
attribute.Fields = element.Elements(
MapXmlSerializer
.
NS
+
"field"
).Select(
Parameter
.
Read
).ToArray();
60
}
61
62
public
string
Type
{
get
;
set
; }
63
64
public
string
Class {
get
;
set
; }
65
66
public
string
Sig
{
get
;
set
; }
67
68
public
Parameter
[]
Params
{
get
;
set
; }
69
70
public
Parameter
[]
Properties
{
get
;
set
; }
71
72
public
Parameter
[]
Fields
{
get
;
set
; }
73
74
}
75
76
}
Type
IKVM.Reflection.Type Type
Definition
IkvmReflectionAssemblySymbol.cs:10
IKVM.Tools.Importer.MapXml.Attribute
Definition
Attribute.cs:32
IKVM.Tools.Importer.MapXml.Attribute.Properties
Parameter[] Properties
Definition
Attribute.cs:70
IKVM.Tools.Importer.MapXml.Attribute.Load
static void Load(Attribute attribute, XElement element)
Loads the XML element into the instance.
Definition
Attribute.cs:51
IKVM.Tools.Importer.MapXml.Attribute.Fields
Parameter[] Fields
Definition
Attribute.cs:72
IKVM.Tools.Importer.MapXml.Attribute.Params
Parameter[] Params
Definition
Attribute.cs:68
IKVM.Tools.Importer.MapXml.Attribute.Read
static Attribute Read(XElement element)
Reads the XML element into a new Attribute instance.
Definition
Attribute.cs:39
IKVM.Tools.Importer.MapXml.Attribute.Sig
string Sig
Definition
Attribute.cs:66
IKVM.Tools.Importer.MapXml.MapXmlElement
Definition
MapXmlElement.cs:32
IKVM.Tools.Importer.MapXml.MapXmlSerializer
Provides the ability to serialize MapXML.
Definition
MapXmlSerializer.cs:14
IKVM.Tools.Importer.MapXml.MapXmlSerializer.NS
static XNamespace NS
Definition
MapXmlSerializer.cs:16
IKVM.Tools.Importer.MapXml.Parameter
Definition
Param.cs:32
IKVM.Tools.Importer.MapXml.Parameter.Read
static Parameter Read(XElement element)
Reads the XML element into a new Parameter instance.
Definition
Param.cs:39
IKVM.Tools.Importer.MapXml
Definition
Add.cs:30
src
IKVM.Tools.Importer
MapXml
Attribute.cs
Generated by
1.12.0