Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.netflix.nebula:nebula-hollow-plugin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.netflix.nebula:nebula-hollow-plugin

Provides a task for generating hollow consumer api

  • 3.0.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

=======

Hollow API Generator Nebula Plugin

Support Status Gradle Plugin Portal Maven Central Build Apache 2.0

This plugin provides task for generating hollow consumer api, that is described here

Usage

In order to use, add plugin dependency to your buildscript

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "com.netflix.nebula:nebula-hollow-plugin:1.+"
    }
}

apply it

apply plugin: 'nebula.hollow'

and configure (you have to specify all the three values to work)

hollow {
    packagesToScan = ['org.example.data', 'org.example.other.data']
    apiClassName = 'MyApi'
    apiPackageName = 'org.example.consumer.api'
}

where:

  • packagesToScan - packages with your data classes, note that scan is recursive
  • apiClassName - class name for your api implementation
  • apiPackageName - target package in your project for api-related sources

optional values:

  • getterPrefix - prefix for getter methods. Ex. _getId()
  • classPostfix - postfix for classes. Ex. MovieHollow.java
  • usePackageGrouping - will create Hollow artifacts separated by sub-packages: index, core, collections
  • parameterizeAllClassNames - if true, all methods which return a Hollow Object will be parameterized. This is useful when alternate implementations are desired for some types. defaults to true
  • useAggressiveSubstitutions - override generated classnames for type names corresponding to any class in the java.lang package. For more details please refer to HollowCodeGenerationUtils. defaults to true
  • useErgonomicShortcuts - generates API shortcuts. For more details please refer to HollowErgonomicAPIShortcutsTest. defaults to true
  • reservePrimaryKeyIndexForTypeWithPrimaryKey - specify to only generate PrimaryKeyIndex for Types that has PrimaryKey defined. defaults to true
  • useHollowPrimitiveTypes - specify to use Hollow Primitive Types instead of generating them per project. defaults to true
  • restrictApiToFieldType - api code only generates get<FieldName> with return type as per schema. defaults to true
  • useVerboseToString - will implement toString() method for hollow objects with HollowRecordStringifier().stringify(this). defaults to true

For more information, please refer to AbstractHollowAPIGeneratorBuilder launch task:

gradle generateHollowConsumerApi

FAQs

Package last updated on 13 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc