/** * Create a new metadata, populate it with default information, add it to * the repository, and return it. * * @param access the access type to use in populating metadata */ public ClassMetaData addMetaData(Class cls, int access) { if (cls == null || cls.isPrimitive()) return null; ClassMetaData meta = newClassMetaData(cls); _factory.getDefaults().populate(meta, access); // synchronize on this rather than the map, because all other methods // that access _metas are synchronized on this synchronized (this) { if (_pawares.containsKey(cls)) throw new MetaDataException(_loc.get("pc-and-aware", cls)); _metas.put(cls, meta); } return meta; }
/** * Create a new metadata, populate it with default information, add it to the repository, and * return it. * * @param access * the access type to use in populating metadata */ public ClassMetaData addMetaData(Class<?> cls, int access, boolean ignoreTransient) { if (cls == null || cls.isPrimitive()) return null; ClassMetaData meta = newClassMetaData(cls); _factory.getDefaults().populate(meta, access, ignoreTransient); // synchronize on this rather than the map, because all other methods // that access _metas are synchronized on this if (_locking) { synchronized(this){ return metasPutInternal(cls, meta); } } else { return metasPutInternal(cls, meta); } }
/** * Create a new metadata, populate it with default information, add it to the repository, and * return it. * * @param access * the access type to use in populating metadata */ public ClassMetaData addMetaData(Class<?> cls, int access, boolean ignoreTransient) { if (cls == null || cls.isPrimitive()) return null; ClassMetaData meta = newClassMetaData(cls); _factory.getDefaults().populate(meta, access, ignoreTransient); // synchronize on this rather than the map, because all other methods // that access _metas are synchronized on this if (_locking) { synchronized(this){ return metasPutInternal(cls, meta); } } else { return metasPutInternal(cls, meta); } }
/** * Create a new metadata, populate it with default information, add it to the repository, and * return it. * * @param access * the access type to use in populating metadata */ public ClassMetaData addMetaData(Class<?> cls, int access, boolean ignoreTransient) { if (cls == null || cls.isPrimitive()) return null; ClassMetaData meta = newClassMetaData(cls); _factory.getDefaults().populate(meta, access, ignoreTransient); // synchronize on this rather than the map, because all other methods // that access _metas are synchronized on this if (_locking) { synchronized(this){ return metasPutInternal(cls, meta); } } else { return metasPutInternal(cls, meta); } }
/** * Create a new metadata, populate it with default information, add it to the repository, and * return it. * * @param access * the access type to use in populating metadata */ public ClassMetaData addMetaData(Class<?> cls, int access, boolean ignoreTransient) { if (cls == null || cls.isPrimitive()) return null; ClassMetaData meta = newClassMetaData(cls); _factory.getDefaults().populate(meta, access, ignoreTransient); // synchronize on this rather than the map, because all other methods // that access _metas are synchronized on this if (_locking) { synchronized(this){ return metasPutInternal(cls, meta); } } else { return metasPutInternal(cls, meta); } }
public ClassMetaData addEmbeddedMetaData() { MetaDataRepository repos = _owner.getRepository(); _embeddedMeta = repos.newEmbeddedClassMetaData(this); _embeddedMeta.setDescribedType(_decType); repos.getMetaDataFactory().getDefaults().populate(_embeddedMeta, ClassMetaData.ACCESS_UNKNOWN); setEmbedded(true); return _embeddedMeta; }
public ClassMetaData addEmbeddedMetaData(int access) { MetaDataRepository repos = _owner.getRepository(); _embeddedMeta = repos.newEmbeddedClassMetaData(this); _embeddedMeta.setDescribedType(_decType); repos.getMetaDataFactory().getDefaults().populate(_embeddedMeta, access); setEmbedded(true); return _embeddedMeta; }
public ClassMetaData addEmbeddedMetaData(int access) { MetaDataRepository repos = _owner.getRepository(); _embeddedMeta = repos.newEmbeddedClassMetaData(this); _embeddedMeta.setDescribedType(_decType); repos.getMetaDataFactory().getDefaults().populate(_embeddedMeta, access); setEmbedded(true); return _embeddedMeta; }
public ClassMetaData addEmbeddedMetaData(int access) { MetaDataRepository repos = _owner.getRepository(); _embeddedMeta = repos.newEmbeddedClassMetaData(this); _embeddedMeta.setDescribedType(_decType); repos.getMetaDataFactory().getDefaults().populate(_embeddedMeta, access); setEmbedded(true); return _embeddedMeta; }
public ClassMetaData addEmbeddedMetaData(int access) { MetaDataRepository repos = _owner.getRepository(); _embeddedMeta = repos.newEmbeddedClassMetaData(this); _embeddedMeta.setDescribedType(_decType); repos.getMetaDataFactory().getDefaults().populate(_embeddedMeta, access); setEmbedded(true); return _embeddedMeta; }