// TypeValue.cpp
#include "stdj2cpp.h"

#include "CustomAttribute.h"
#include "TypeValue.h"

/**
When an attribute takes System.Object type as an argument, the blob keeps
a type code and a value
*/

TypeValue::TypeValue(jbyte typecode, Object* value) : 
Object() , elemtypecode(0) , enumTypename(null)
{
    this->typecode = typecode;
    this->value = value;
}

TypeValue::TypeValue(jbyte typecode, jbyte elemtypecode, Object* value)
{
    *this = TypeValue(typecode, value);
    this->elemtypecode = elemtypecode;
}

TypeValue::TypeValue(jbyte typecode, String enumTypename, Object* value)
{
    *this = TypeValue(typecode, value);
    this->enumTypename = enumTypename;
}


Object* TypeValue::clone()
{
    return new TypeValue(*this);
}
