Tabnine Logo
TypeDef.isAbstract
Code IndexAdd Tabnine to your IDE (free)

How to use
isAbstract
method
in
io.sundr.codegen.model.TypeDef

Best Java code snippets using io.sundr.codegen.model.TypeDef.isAbstract (Showing top 7 results out of 315)

origin: sundrio/sundrio

  sb.append(STATIC).append(SPACE);
if (isAbstract()) {
  sb.append(ABSTRACT).append(SPACE);
origin: sundrio/sundrio

/**
 * Checks a {@link TypeRef} is of an abstract type.
 * @param   typeRef The type to check.
 * @return  True if its an abstract type.
 */
public static boolean isAbstract(TypeRef  typeRef) {
  DefinitionRepository repository =  DefinitionRepository.getRepository();
  TypeDef def = repository.getDefinition(typeRef);
  if (def == null && typeRef instanceof ClassRef) {
    def = ((ClassRef)typeRef).getDefinition();
  }
  return def != null ? def.isAbstract() : false;
}
origin: sundrio/sundrio

  public Set<TypeDef> apply(TypeDef item) {
    if (item.equals(TypeDef.OBJECT)) {
      return new LinkedHashSet<TypeDef>();
    }
    Set<TypeDef> result = new LinkedHashSet<TypeDef>();
    BuilderContext ctx = BuilderContextManager.getContext();
    BuildableRepository repository = ctx.getBuildableRepository();
    for (TypeDef type : repository.getBuildables()) {
      if (type.getKind() == Kind.CLASS &&  !type.isAbstract() && isDescendant(type, item) && !type.equals(item) && !type.hasAttribute(GENERATED)) {
        result.add(type);
      }
    }
    return result;
  }
});
origin: sundrio/sundrio

  public TypeDef apply(final TypeDef item) {
    final Modifier[] modifiers = item.isAbstract()
        ? new Modifier[]{Modifier.PUBLIC, Modifier.ABSTRACT}
        : new Modifier[]{Modifier.PUBLIC};
    final TypeDef editable = EDITABLE.apply(item);
    return new TypeDefBuilder(BUILDER.apply(item))
        .withAnnotations()
        .accept(new TypedVisitor<MethodBuilder>() {
      public void visit(MethodBuilder builder) {
        if (builder.getName() != null && builder.getName().equals("build")) {
          builder.withModifiers(TypeUtils.modifiersToInt(modifiers));
          builder.withReturnType(editable.toInternalReference());
          builder.withBlock(new Block(new Provider<List<Statement>>() {
            @Override
            public List<Statement> get() {
              return toBuild(editable, editable);
            }
          }));
        }
      }
    }).build();
  }
});
origin: sundrio/sundrio

    Constants.DEFAULT_SOURCEFILE_TEMPLATE_LOCATION);
if (typeDef.isAbstract()) {
  continue;
origin: sundrio/sundrio

public TypeDef apply(TypeDef item) {
  Modifier[] modifiers = item.isAbstract()
      ? new Modifier[]{Modifier.PUBLIC, Modifier.ABSTRACT}
      : new Modifier[]{Modifier.PUBLIC};
origin: sundrio/sundrio

public TypeDef apply(final TypeDef item) {
  final boolean validationEnabled = item.hasAttribute(VALIDATION_ENABLED) ? item.getAttribute(VALIDATION_ENABLED) : false;
  final Modifier[] modifiers = item.isAbstract()
      ? new Modifier[]{Modifier.PUBLIC, Modifier.ABSTRACT}
      : new Modifier[]{Modifier.PUBLIC};
io.sundr.codegen.modelTypeDefisAbstract

Popular methods of TypeDef

  • getFullyQualifiedName
    Returns the fully qualified name of the type.
  • getName
  • getPackageName
  • equals
  • getAttributes
  • getConstructors
  • getExtendsList
  • getMethods
  • getParameters
  • getProperties
  • toInternalReference
    Creates a ClassRef for internal use inside the scope of the type (methods, properties etc). It uses
  • toReference
  • toInternalReference,
  • toReference,
  • getAnnotations,
  • getAttribute,
  • getImplementsList,
  • getKind,
  • hasAttribute,
  • isAssignableFrom,
  • toUnboundedReference

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • 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