📄 valueobjelement.java
字号:
// You can redistribute this software and/or modify it under the terms of
// the Ozone Core License version 1 published by ozone-db.org.
//
// The original code and portions created by SMB are
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
//
// $Id: ValueObjElement.java,v 1.3 2002/09/18 06:54:17 per_nyfelt Exp $
package org.ozoneDB.core.xml;
import org.xml.sax.*;
import org.ozoneDB.OzoneProxy;
/**
* This class saves all attributes of the valueObjElement.
*
* @version $Revision: 1.3 $
* @author <a href="http://www.softwarebuero.de">SMB</a>
*/
public class ValueObjElement implements Consts {
//
// member
//
/**
* The type of the valueObj.
*/
private String type;
/**
* The id of the valueObj.
*/
private String id;
/**
*/
private Object obj;
//
// constructor
//
/**
* The constructor creates a new instance of the obj with this className.
*/
public ValueObjElement () {
}
/**
* This constructor creates a proper ValueObjElement object,
* containing an OzoneProxy.
*
* @param proxy (an OzoneProxy)
*/
public ValueObjElement (OzoneProxy proxy) {
this.obj = proxy;
this.type = proxy.getClass().getName();
}
/**
* The constructor creates a new instance of the obj with this className.
*
* @param atts (the attributes)
*/
public ValueObjElement (Attributes atts)
throws ClassNotFoundException, InstantiationException, IllegalAccessException {
type = atts.getValue(ATTR_TYPE);
id = atts.getValue(ATTR_ID);
Class objClass = Thread.currentThread().getContextClassLoader().loadClass(type);
obj = objClass.newInstance();
}
//
// methods
//
/**
*/
public String getType() {
return type;
}
/**
*/
public String getId() {
return id;
}
/**
*/
public Object getObject() {
return obj;
}
/**
*/
public String toString() {
return ("ValueObjElement: " + type);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -