当前位置: 首页>>代码示例>>Java>>正文


Java Visibility类代码示例

本文整理汇总了Java中org.jboss.forge.roaster.model.Visibility的典型用法代码示例。如果您正苦于以下问题:Java Visibility类的具体用法?Java Visibility怎么用?Java Visibility使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Visibility类属于org.jboss.forge.roaster.model包,在下文中一共展示了Visibility类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deserialize

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Visibility deserialize(@Nonnull JsonParser jsonParser, @Nonnull DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
    String name = jsonParser.getText().toUpperCase();

    if ("PACKAGE-PRIVATE".equals(name)) {
        return Visibility.PACKAGE_PRIVATE;
    }

    return Visibility.valueOf(name);
}
 
开发者ID:BasinMC,项目名称:minecraft-maven-plugin,代码行数:14,代码来源:VisibilityJsonDeserializer.java

示例2: TransformationType

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@JsonCreator
private TransformationType(@Nullable @JsonProperty("visibility") Visibility visibility, @Nullable @JsonProperty("fields") Map<String, Visibility> fields, @Nullable @JsonProperty("methods") Map<String, Visibility> methods) {
    if (fields == null) {
        fields = new HashMap<>();
    }

    if (methods == null) {
        methods = new HashMap<>();
    }

    this.visibility = visibility;
    this.fields = fields;
    this.methods = methods;
}
 
开发者ID:BasinMC,项目名称:minecraft-maven-plugin,代码行数:15,代码来源:TransformationType.java

示例3: read

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
 * Reads an access transformation map from a supplied path.
 *
 * @throws IOException when accessing the file fails.
 */
@Nonnull
public static AccessTransformationMap read(@Nonnull Path path) throws IOException {
    ObjectMapper mapper = new ObjectMapper();

    {
        SimpleModule module = new SimpleModule("Access Transformation Serialization");
        module.addDeserializer(Visibility.class, new VisibilityJsonDeserializer());
        mapper.registerModule(module);
    }

    try (FileInputStream inputStream = new FileInputStream(path.toFile())) {
        return mapper.readValue(inputStream, AccessTransformationMap.class);
    }
}
 
开发者ID:BasinMC,项目名称:minecraft-maven-plugin,代码行数:20,代码来源:AccessTransformationMap.java

示例4: setVisibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Object setVisibility(Visibility scope) {
    return null;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:5,代码来源:StatementFieldSource.java

示例5: getVisibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Visibility getVisibility() {
    return null;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:5,代码来源:StatementFieldSource.java

示例6: setVisibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public MethodSource<JavaClassSource> setVisibility(Visibility visibility) {
    return null;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:5,代码来源:AnonymousMethodSource.java

示例7: visibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Visibility visibility() {
	return PUBLIC;
}
 
开发者ID:robsonbittencourt,项目名称:utility-generator,代码行数:5,代码来源:MapperTesterShouldTestAllParamsMethod.java

示例8: visibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Visibility visibility() {
	return PRIVATE;
}
 
开发者ID:robsonbittencourt,项目名称:utility-generator,代码行数:5,代码来源:FixtureBaseField.java

示例9: visibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Override
public Visibility visibility() {
	return Visibility.PUBLIC;
}
 
开发者ID:robsonbittencourt,项目名称:utility-generator,代码行数:5,代码来源:FixtureWithRandomValueMethod.java

示例10: shouldBeAPublicMethod

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Test
public void shouldBeAPublicMethod() {
	assertEquals(Visibility.PUBLIC, method.visibility());
}
 
开发者ID:robsonbittencourt,项目名称:utility-generator,代码行数:5,代码来源:MapperTesterShouldTestAllParamsMethodTest.java

示例11: shouldBeAPublicField

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
@Test
public void shouldBeAPublicField() {
	assertEquals(Visibility.PRIVATE, field.visibility());
}
 
开发者ID:robsonbittencourt,项目名称:utility-generator,代码行数:5,代码来源:FixtureBaseFieldTest.java

示例12: getFieldVisibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
 * Retrieves the altered visibility for a field of a specific name (if any).
 */
@Nonnull
public Optional<Visibility> getFieldVisibility(@Nonnull String fieldName) {
    return Optional.ofNullable(this.fields.get(fieldName));
}
 
开发者ID:BasinMC,项目名称:minecraft-maven-plugin,代码行数:8,代码来源:TransformationType.java

示例13: getMethodVisibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
 * Retrieves the altered visibility for a method of a specific name (if any).
 */
@Nonnull
public Optional<Visibility> getMethodVisibility(@Nonnull String methodName) {
    return Optional.ofNullable(this.methods.get(methodName));
}
 
开发者ID:BasinMC,项目名称:minecraft-maven-plugin,代码行数:8,代码来源:TransformationType.java

示例14: getVisibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
/**
 * Retrieves the type visibility.
 */
@Nonnull
public Optional<Visibility> getVisibility() {
    return Optional.ofNullable(this.visibility);
}
 
开发者ID:BasinMC,项目名称:minecraft-maven-plugin,代码行数:8,代码来源:TransformationType.java

示例15: visibility

import org.jboss.forge.roaster.model.Visibility; //导入依赖的package包/类
Visibility visibility(); 
开发者ID:robsonbittencourt,项目名称:utility-generator,代码行数:2,代码来源:GeneratedMethod.java


注:本文中的org.jboss.forge.roaster.model.Visibility类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。