/** * @param identifiables * @return a map */ private static <T extends IdentifiableBase> Map<String, T> mapById( List<T> identifiables ) { Map<String, T> byId = new HashMap<>(); for ( T identifiable : identifiables ) { byId.put( identifiable.getId(), identifiable ); } return byId; }
/** * @param dominant * @param recessive * @param recessiveSourceLevel */ private static <T extends IdentifiableBase> void shallowMergeById( List<T> dominant, List<T> recessive, String recessiveSourceLevel ) { Map<String, T> dominantById = mapById( dominant ); for ( T identifiable : recessive ) { if ( !dominantById.containsKey( identifiable.getId() ) ) { identifiable.setSourceLevel( recessiveSourceLevel ); dominant.add( identifiable ); } } }
/** * Method clone. * * @return Proxy */ public Proxy clone() { try { Proxy copy = (Proxy) super.clone(); return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Proxy clone()
IdentifiableBase identifiableBase = new IdentifiableBase(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) identifiableBase.setId( interpolatedTrimmed( parser.nextText(), "id" ) );
IdentifiableBase identifiableBase = new IdentifiableBase(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) identifiableBase.setId( interpolatedTrimmed( parser.nextText(), "id" ) );
/** * Method writeIdentifiableBase. * * @param identifiableBase * @param serializer * @param tagName * @throws java.io.IOException */ private void writeIdentifiableBase( IdentifiableBase identifiableBase, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( ( identifiableBase.getId() != null ) && !identifiableBase.getId().equals( "default" ) ) { serializer.startTag( NAMESPACE, "id" ).text( identifiableBase.getId() ).endTag( NAMESPACE, "id" ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writeIdentifiableBase( IdentifiableBase, String, XmlSerializer )
/** * @param dominant * @param recessive * @param recessiveSourceLevel */ private static <T extends IdentifiableBase> void shallowMergeById( List<T> dominant, List<T> recessive, String recessiveSourceLevel ) { Map<String, T> dominantById = mapById( dominant ); for ( T identifiable : recessive ) { if ( !dominantById.containsKey( identifiable.getId() ) ) { identifiable.setSourceLevel( recessiveSourceLevel ); dominant.add( identifiable ); } } }
/** * Method clone. * * @return Mirror */ public Mirror clone() { try { Mirror copy = (Mirror) super.clone(); return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Mirror clone()
/** * Method writeIdentifiableBase. * * @param identifiableBase * @param serializer * @param tagName * @throws java.io.IOException */ private void writeIdentifiableBase( IdentifiableBase identifiableBase, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( ( identifiableBase.getId() != null ) && !identifiableBase.getId().equals( "default" ) ) { serializer.startTag( NAMESPACE, "id" ).text( identifiableBase.getId() ).endTag( NAMESPACE, "id" ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writeIdentifiableBase( IdentifiableBase, String, XmlSerializer )
/** * @param dominant * @param recessive * @param recessiveSourceLevel */ private static <T extends IdentifiableBase> void shallowMergeById( List<T> dominant, List<T> recessive, String recessiveSourceLevel ) { Map<String, T> dominantById = mapById( dominant ); for ( T identifiable : recessive ) { if ( !dominantById.containsKey( identifiable.getId() ) ) { identifiable.setSourceLevel( recessiveSourceLevel ); dominant.add( identifiable ); } } }
/** * Method clone. * * @return Server */ public Server clone() { try { Server copy = (Server) super.clone(); if ( this.configuration != null ) { copy.configuration = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.configuration ); } return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Server clone()
/** * @param identifiables * @return a map */ private static <T extends IdentifiableBase> Map<String, T> mapById( List<T> identifiables ) { Map<String, T> byId = new HashMap<>(); for ( T identifiable : identifiables ) { byId.put( identifiable.getId(), identifiable ); } return byId; }
Profile copy = (Profile) super.clone();
/** * @param identifiables * @return a map */ private static <T extends IdentifiableBase> Map<String, T> mapById( List<T> identifiables ) { Map<String, T> byId = new HashMap<String, T>(); for ( T identifiable : identifiables ) { byId.put( identifiable.getId(), identifiable ); } return byId; }
/** * Method clone. * * @return Mirror */ public Mirror clone() { try { Mirror copy = (Mirror) super.clone(); return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Mirror clone()
/** * Method updateIdentifiableBase. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateIdentifiableBase(IdentifiableBase value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null); } } //-- void updateIdentifiableBase(IdentifiableBase, String, Counter, Element)
/** * Method clone. * * @return Proxy */ public Proxy clone() { try { Proxy copy = (Proxy) super.clone(); return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Proxy clone()
/** * Method updateIdentifiableBase * * @param value * @param element * @param counter * @param xmlTag */ protected void updateIdentifiableBase(IdentifiableBase value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null); } } //-- void updateIdentifiableBase(IdentifiableBase, String, Counter, Element)
/** * Method clone. * * @return Server */ public Server clone() { try { Server copy = (Server) super.clone(); if ( this.configuration != null ) { copy.configuration = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.configuration ); } return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- Server clone()
Profile copy = (Profile) super.clone();