Tabnine Logo
IdentifiableBase
Code IndexAdd Tabnine to your IDE (free)

How to use
IdentifiableBase
in
org.apache.maven.settings

Best Java code snippets using org.apache.maven.settings.IdentifiableBase (Showing top 20 results out of 315)

origin: apache/maven

/**
 * @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;
}
origin: apache/maven

/**
 * @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 );
    }
  }
}
origin: apache/maven

/**
 * 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()
origin: apache/maven

IdentifiableBase identifiableBase = new IdentifiableBase();
for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
    identifiableBase.setId( interpolatedTrimmed( parser.nextText(), "id" ) );
origin: org.apache.maven/maven-settings

IdentifiableBase identifiableBase = new IdentifiableBase();
for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
    identifiableBase.setId( interpolatedTrimmed( parser.nextText(), "id" ) );
origin: apache/maven

/**
 * 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 )
origin: org.apache.maven/maven-settings-builder

/**
 * @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 );
    }
  }
}
origin: apache/maven

/**
 * 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()
origin: org.apache.maven/maven-settings

/**
 * 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 )
origin: io.tesla.maven/maven-settings-builder

/**
 * @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 );
    }
  }
}
origin: apache/maven

/**
 * 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()
origin: org.apache.maven/maven-settings-builder

/**
 * @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;
}
origin: apache/maven

Profile copy = (Profile) super.clone();
origin: io.tesla.maven/maven-settings-builder

/**
 * @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;
}
origin: org.apache.maven/maven-settings

/**
 * 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()
origin: org.netbeans.api/org-netbeans-modules-maven-embedder

/**
 * 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) 
origin: org.apache.maven/maven-settings

/**
 * 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()
origin: org.codehaus.mevenide/nb-mvn-embedder

/**
 * 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) 
origin: org.apache.maven/maven-settings

/**
 * 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()
origin: org.apache.maven/maven-settings

Profile copy = (Profile) super.clone();
org.apache.maven.settingsIdentifiableBase

Javadoc

Base class for Mirror, Profile, Proxy and Server.

Most used methods

  • getId
    Get the id field.
  • setSourceLevel
  • <init>
  • clone
    Method clone.
  • setId
    Set the id field.

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now