home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (PropertyAttributes.java)

This example Scala source code file (PropertyAttributes.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

hasdefault, propertyattributes, propertyattributes, rtspecialname, rtspecialname, specialname, specialname, string, stringbuffer, stringbuffer

The Scala PropertyAttributes.java source code

/*
 * System.Reflection-like API for access to .NET assemblies (DLL & EXE)
 */


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

Other Scala examples (source code examples)

Here is a short list of links related to this Scala PropertyAttributes.java source code file:



my book on functional programming

 

new blog posts

 

Copyright 1998-2019 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.