summaryrefslogtreecommitdiff
path: root/src/msil/ch/epfl/lamp/compiler/msil/PropertyAttributes.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/msil/ch/epfl/lamp/compiler/msil/PropertyAttributes.java')
-rw-r--r--src/msil/ch/epfl/lamp/compiler/msil/PropertyAttributes.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/msil/ch/epfl/lamp/compiler/msil/PropertyAttributes.java b/src/msil/ch/epfl/lamp/compiler/msil/PropertyAttributes.java
new file mode 100644
index 0000000000..ca137ba99f
--- /dev/null
+++ b/src/msil/ch/epfl/lamp/compiler/msil/PropertyAttributes.java
@@ -0,0 +1,46 @@
+/*
+ * System.Reflection-like API for access to .NET assemblies (DLL & EXE)
+ */
+
+// $Id$
+
+package ch.epfl.lamp.compiler.msil;
+
+/**
+ * Attributes applcicable to properties
+ *
+ * @author Nikolay Mihaylov
+ * @version 1.0
+ */
+public final class PropertyAttributes {
+
+ // makes the class uninstantiable
+ private PropertyAttributes() {}
+
+ //##########################################################################
+
+ /** Specifies that the property is special, with the name describing
+ * how the property is special.
+ */
+ public static final short SpecialName = 0x0200;
+
+ /** Specifies that the metadata internal APIs check the name encoding.
+ */
+ public static final short RTSpecialName = 0x0400;
+
+ /** Specifies that the property has a default value.
+ */
+ public static final short HasDefault = 0x1000;
+
+ //##########################################################################
+
+ public static String toString(short attrs) {
+ StringBuffer str = new StringBuffer();
+ if ((attrs & SpecialName) != 0) str.append("specialname ");
+ if ((attrs & RTSpecialName) != 0) str.append("rtspecialname ");
+ return str.toString();
+ }
+
+ //##########################################################################
+
+} // class PropertyAttributes