www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@junit/loadobj.m
function UnitObj = loadobj(UnitObj) %LOADOBJ % Copyright 2000-2007 The MathWorks, Inc. %JUNIT/LOADOBJ Load a junit object Unit. % % UnitObj = LOADOBJ(UnitObj) loads a junit object UnitObj. % % See also SAVEOBJ. % --------------------------------------------------------------------------- % Description : Method to load a junit object UnitObj. % Inputs : UnitObj - junit object (junit) % Outputs : UnitObj - junit object (junit) % --------------------------------------------------------------------------- if isstruct(UnitObj) UnitObj= i_Update(UnitObj); % Recreate the Java junit object from the constructor UnitObj = junit(UnitObj); elseif UnitObj.IsValid UnitObj.IsValid= false; end % Recreate the Java junit object from the constructor % RecreatedUnit = junit(UnitObj); function UnitObj= i_Update(UnitObj) % force the constructor here UnitObj.IsValid= true; UnitObj.JUnitVer=2;