congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AttributeDefinition
Code IndexAdd Tabnine to your IDE (free)

How to use
AttributeDefinition
in
org.eclipse.persistence.internal.codegen

Best Java code snippets using org.eclipse.persistence.internal.codegen.AttributeDefinition (Showing top 20 results out of 315)

origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

protected void adjustTypeNames(Map typeNameMap) {
  adjustInitialValue(typeNameMap);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Used for calculating imports.  @see org.eclipse.persistence.internal.codegen.ClassDefinition#calculateImports()
 */
protected void putTypeNamesInMap(Map typeNameMap) {
  putTypeNameInMap(getTypeName(), typeNameMap);
  for (Iterator i = parseForTypeNames(getInitialValue()).iterator(); i.hasNext();) {
    putTypeNameInMap((String)i.next(), typeNameMap);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Parses the initial value, removing the package name for each type
 * (and adding the appropriate import) if the type is
 * unambiguous.
 */
private void adjustInitialValue(Map typeNameMap) {
  if (getInitialValue() == null) {
    return;
  }
  StringBuilder initialValue = new StringBuilder(getInitialValue());
  Set typeNames = parseForTypeNames(initialValue.toString());
  for (Iterator i = typeNames.iterator(); i.hasNext();) {
    String typeName = (String)i.next();
    String adjustedTypeName = adjustTypeName(typeName, typeNameMap);
    if (!typeName.equals(adjustedTypeName)) {
      int typeNameStartIndex = initialValue.toString().indexOf(typeName);
      while (typeNameStartIndex != -1) {
        initialValue.replace(typeNameStartIndex, typeNameStartIndex + typeName.length(), adjustedTypeName);
        typeNameStartIndex = initialValue.toString().indexOf(typeName);
      }
    }
  }
  setInitialValue(initialValue.toString());
}
origin: com.haulmont.thirdparty/eclipselink

  public void writeBody(CodeGenerator generator) {
    generator.writeType(getTypeName());
    generator.writeType(" ");
    generator.write(getName());

    if (getInitialValue() != null) {
      generator.write(" = ");
      generator.write(getInitialValue());
    }

    generator.write(";");
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

protected void adjustTypeNames(Map typeNameMap) {
  adjustType(typeNameMap);
  super.adjustTypeNames(typeNameMap);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

private void addTypeNamesToMap(HashMap typeNameMap) {
  putTypeNameInMap(getSuperClass(), typeNameMap);
  for (Iterator i = getInterfaces().iterator(); i.hasNext();) {
    putTypeNameInMap((String)i.next(), typeNameMap);
  }
  for (Iterator i = getAttributes().iterator(); i.hasNext();) {
    ((AttributeDefinition)i.next()).putTypeNamesInMap(typeNameMap);
  }
  for (Iterator i = getMethods().iterator(); i.hasNext();) {
    ((MethodDefinition)i.next()).putTypeNamesInMap(typeNameMap);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Parses the initial value, removing the package name for each type
 * (and adding the appropriate import) if the type is
 * unambiguous.
 */
private void adjustInitialValue(Map typeNameMap) {
  if (getInitialValue() == null) {
    return;
  }
  StringBuilder initialValue = new StringBuilder(getInitialValue());
  Set typeNames = parseForTypeNames(initialValue.toString());
  for (Iterator i = typeNames.iterator(); i.hasNext();) {
    String typeName = (String)i.next();
    String adjustedTypeName = adjustTypeName(typeName, typeNameMap);
    if (!typeName.equals(adjustedTypeName)) {
      int typeNameStartIndex = initialValue.toString().indexOf(typeName);
      while (typeNameStartIndex != -1) {
        initialValue.replace(typeNameStartIndex, typeNameStartIndex + typeName.length(), adjustedTypeName);
        typeNameStartIndex = initialValue.toString().indexOf(typeName);
      }
    }
  }
  setInitialValue(initialValue.toString());
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

  public void writeBody(CodeGenerator generator) {
    generator.writeType(getTypeName());
    generator.writeType(" ");
    generator.write(getName());

    if (getInitialValue() != null) {
      generator.write(" = ");
      generator.write(getInitialValue());
    }

    generator.write(";");
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

protected void adjustTypeNames(Map typeNameMap) {
  adjustType(typeNameMap);
  super.adjustTypeNames(typeNameMap);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

private void addTypeNamesToMap(HashMap typeNameMap) {
  putTypeNameInMap(getSuperClass(), typeNameMap);
  for (Iterator i = getInterfaces().iterator(); i.hasNext();) {
    putTypeNameInMap((String)i.next(), typeNameMap);
  }
  for (Iterator i = getAttributes().iterator(); i.hasNext();) {
    ((AttributeDefinition)i.next()).putTypeNamesInMap(typeNameMap);
  }
  for (Iterator i = getMethods().iterator(); i.hasNext();) {
    ((MethodDefinition)i.next()).putTypeNamesInMap(typeNameMap);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Used for calculating imports.  @see org.eclipse.persistence.internal.codegen.ClassDefinition#calculateImports()
 */
protected void putTypeNamesInMap(Map typeNameMap) {
  putTypeNameInMap(getTypeName(), typeNameMap);
  for (Iterator i = parseForTypeNames(getInitialValue()).iterator(); i.hasNext();) {
    putTypeNameInMap((String)i.next(), typeNameMap);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Parses the initial value, removing the package name for each type
 * (and adding the appropriate import) if the type is
 * unambiguous.
 */
private void adjustInitialValue(Map typeNameMap) {
  if (getInitialValue() == null) {
    return;
  }
  StringBuffer initialValue = new StringBuffer(getInitialValue());
  Set typeNames = parseForTypeNames(initialValue.toString());
  for (Iterator i = typeNames.iterator(); i.hasNext();) {
    String typeName = (String)i.next();
    String adjustedTypeName = adjustTypeName(typeName, typeNameMap);
    if (!typeName.equals(adjustedTypeName)) {
      int typeNameStartIndex = initialValue.toString().indexOf(typeName);
      while (typeNameStartIndex != -1) {
        initialValue.replace(typeNameStartIndex, typeNameStartIndex + typeName.length(), adjustedTypeName);
        typeNameStartIndex = initialValue.toString().indexOf(typeName);
      }
    }
  }
  setInitialValue(initialValue.toString());
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  public void writeBody(CodeGenerator generator) {
    generator.writeType(getTypeName());
    generator.writeType(" ");
    generator.write(getName());

    if (getInitialValue() != null) {
      generator.write(" = ");
      generator.write(getInitialValue());
    }

    generator.write(";");
  }
}
origin: com.haulmont.thirdparty/eclipselink

protected void adjustTypeNames(Map typeNameMap) {
  adjustType(typeNameMap);
  super.adjustTypeNames(typeNameMap);
}
origin: com.haulmont.thirdparty/eclipselink

private void addTypeNamesToMap(HashMap typeNameMap) {
  putTypeNameInMap(getSuperClass(), typeNameMap);
  for (Iterator i = getInterfaces().iterator(); i.hasNext();) {
    putTypeNameInMap((String)i.next(), typeNameMap);
  }
  for (Iterator i = getAttributes().iterator(); i.hasNext();) {
    ((AttributeDefinition)i.next()).putTypeNamesInMap(typeNameMap);
  }
  for (Iterator i = getMethods().iterator(); i.hasNext();) {
    ((MethodDefinition)i.next()).putTypeNamesInMap(typeNameMap);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

protected void adjustTypeNames(Map typeNameMap) {
  adjustInitialValue(typeNameMap);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Used for calculating imports.  @see org.eclipse.persistence.internal.codegen.ClassDefinition#calculateImports()
 */
protected void putTypeNamesInMap(Map typeNameMap) {
  putTypeNameInMap(getTypeName(), typeNameMap);
  for (Iterator i = parseForTypeNames(getInitialValue()).iterator(); i.hasNext();) {
    putTypeNameInMap((String)i.next(), typeNameMap);
  }
}
origin: com.haulmont.thirdparty/eclipselink

private void adjustTypeNames(HashMap typeNameMap) {
  setSuperClass(adjustTypeName(getSuperClass(), typeNameMap));
  for (Iterator i = new Vector(getInterfaces()).iterator(); i.hasNext();) {
    String interfaceName = (String)i.next();
    replaceInterface(interfaceName, adjustTypeName(interfaceName, typeNameMap));
  }
  for (Iterator i = getAttributes().iterator(); i.hasNext();) {
    ((AttributeDefinition)i.next()).adjustTypeNames(typeNameMap);
  }
  for (Iterator i = getMethods().iterator(); i.hasNext();) {
    ((MethodDefinition)i.next()).adjustTypeNames(typeNameMap);
  }
}
origin: com.haulmont.thirdparty/eclipselink

protected void adjustTypeNames(Map typeNameMap) {
  adjustInitialValue(typeNameMap);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

private void adjustTypeNames(HashMap typeNameMap) {
  setSuperClass(adjustTypeName(getSuperClass(), typeNameMap));
  for (Iterator i = new Vector(getInterfaces()).iterator(); i.hasNext();) {
    String interfaceName = (String)i.next();
    replaceInterface(interfaceName, adjustTypeName(interfaceName, typeNameMap));
  }
  for (Iterator i = getAttributes().iterator(); i.hasNext();) {
    ((AttributeDefinition)i.next()).adjustTypeNames(typeNameMap);
  }
  for (Iterator i = getMethods().iterator(); i.hasNext();) {
    ((MethodDefinition)i.next()).adjustTypeNames(typeNameMap);
  }
}
org.eclipse.persistence.internal.codegenAttributeDefinition

Javadoc

INTERNAL:

Purpose: Model an attribute for code generation purposes.

Most used methods

  • adjustInitialValue
    Parses the initial value, removing the package name for each type (and adding the appropriate import
  • adjustTypeName
  • adjustTypeNames
  • getInitialValue
  • getName
  • getTypeName
  • parseForTypeNames
  • putTypeNameInMap
  • putTypeNamesInMap
    Used for calculating imports. @see org.eclipse.persistence.internal.codegen.ClassDefinition#calculat
  • setInitialValue
  • write
  • write

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Menu (java.awt)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Permission (java.security)
    Legacy security code; do not use.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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