repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/linkis
1,065
linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/CombinedLabel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.linkis.manager.label.entity; import java.util.List; public interface CombinedLabel extends Label<List<Label<?>>>, ResourceLabel { default List<Label<?>> getLabels() { return getValue(); } @Override boolean equals(Object obj); }
apache/linkis
1,067
linkis-public-enhancements/linkis-pes-common/src/main/java/org/apache/linkis/cs/common/entity/history/metadata/TableLineageHistory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.linkis.cs.common.entity.history.metadata; import org.apache.linkis.cs.common.entity.metadata.Table; import java.util.List; public interface TableLineageHistory { List<Table> getSourceTables(); void setSourceTables(List<Table> tables); }
apache/maven-compiler-plugin
1,096
src/it/multirelease-patterns/multimodule/multirelease-nine/src/main/java/mr/A.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package mr; import java.util.Optional; import base.Base; public class A implements I { public static String getString() { return Base.get() + " -> " + Optional.of("9").get(); } @Override public Class<?> introducedClass() { return Module.class; } }
apache/maven-surefire
1,056
surefire-its/src/test/resources/testng-groups/src/test/java/testng/groups/TestNGGroupTest.java
package testng.groups; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; /** * Tests grouping */ public class TestNGGroupTest { private Object testObject; @BeforeClass( groups = "functional" ) public void configureTest() { testObject = new Object(); } @Test( groups = { "functional" } ) public void isFunctional() { Assert.assertNotNull( testObject, "testObject is null" ); } @Test( groups = { "functional", "notincluded" } ) public void isFunctionalAndNotincluded() { Assert.assertNotNull( testObject, "testObject is null" ); } @Test( groups = "notincluded" ) public void isNotIncluded() { Assert.assertTrue( false ); } @Test( groups = "abc-def" ) public void isDashedGroup() { } @Test( groups = "foo.bar" ) public void isFooBar() { } @Test( groups = "foo.zap" ) public void isFooZap() { } @Test public void noGroup() { } }
apache/maven
1,102
compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * <a href="https://maven.apache.org/resolver/">Maven Resolver</a> extensions for utilizing the Maven POM and Maven * repository metadata. * * @deprecated since 4.0.0, use {@code maven-api-impl} jar instead */ @Deprecated(since = "4.0.0") package org.apache.maven.repository.internal;
apache/myfaces
1,133
api/src/main/java/jakarta/faces/component/html/_TitleProperty.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package jakarta.faces.component.html; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty; interface _TitleProperty { /** * HTML: An advisory title for this element. Often used by the user agent as a tooltip. * */ @JSFProperty public abstract String getTitle(); }
apache/myfaces
1,140
api/src/main/java/jakarta/faces/flow/MethodCallNode.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package jakarta.faces.flow; import java.util.List; /** * * @since 2.2 */ public abstract class MethodCallNode extends FlowNode { public abstract jakarta.el.MethodExpression getMethodExpression(); public abstract jakarta.el.ValueExpression getOutcome(); public abstract List<Parameter> getParameters(); }
apache/nifi
1,121
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/RuntimeValidator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.bootstrap.process; import java.util.List; public interface RuntimeValidator { /** * Validates if the given runtime configuration is within application best practices * * @return a List of {@code RuntimeValidatorResult} */ List<RuntimeValidatorResult> validate(); }
apache/olingo-odata4
1,111
lib/client-core/src/main/java/org/apache/olingo/client/core/LiteralSearch.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core; import org.apache.olingo.client.api.uri.URISearch; public class LiteralSearch implements URISearch { private final String value; LiteralSearch(final String value) { this.value = value; } @Override public String build() { return value; } }
apache/olingo-odata4
1,112
lib/client-core/src/main/java/org/apache/olingo/client/core/uri/EqFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core.uri; import org.apache.olingo.client.api.uri.FilterArg; public class EqFilter extends AbstractComparingFilter { EqFilter(final FilterArg left, final FilterArg right) { super(left, right); } @Override protected String getOp() { return "eq"; } }
apache/olingo-odata4
1,112
lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GeFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core.uri; import org.apache.olingo.client.api.uri.FilterArg; public class GeFilter extends AbstractComparingFilter { GeFilter(final FilterArg left, final FilterArg right) { super(left, right); } @Override protected String getOp() { return "ge"; } }
apache/olingo-odata4
1,112
lib/client-core/src/main/java/org/apache/olingo/client/core/uri/GtFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core.uri; import org.apache.olingo.client.api.uri.FilterArg; public class GtFilter extends AbstractComparingFilter { GtFilter(final FilterArg left, final FilterArg right) { super(left, right); } @Override protected String getOp() { return "gt"; } }
apache/olingo-odata4
1,112
lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LeFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core.uri; import org.apache.olingo.client.api.uri.FilterArg; public class LeFilter extends AbstractComparingFilter { LeFilter(final FilterArg left, final FilterArg right) { super(left, right); } @Override protected String getOp() { return "le"; } }
apache/olingo-odata4
1,112
lib/client-core/src/main/java/org/apache/olingo/client/core/uri/LtFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core.uri; import org.apache.olingo.client.api.uri.FilterArg; public class LtFilter extends AbstractComparingFilter { LtFilter(final FilterArg left, final FilterArg right) { super(left, right); } @Override protected String getOp() { return "lt"; } }
apache/olingo-odata4
1,112
lib/client-core/src/main/java/org/apache/olingo/client/core/uri/NeFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core.uri; import org.apache.olingo.client.api.uri.FilterArg; public class NeFilter extends AbstractComparingFilter { NeFilter(final FilterArg left, final FilterArg right) { super(left, right); } @Override protected String getOp() { return "ne"; } }
apache/oozie
1,133
core/src/main/java/org/apache/oozie/command/wf/StartXCommand.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.oozie.command.wf; import org.apache.oozie.util.InstrumentUtils; /** * Starting the command. */ public class StartXCommand extends SignalXCommand { public StartXCommand(String id) { super("start", 1, id); InstrumentUtils.incrJobCounter(getName(), 1, getInstrumentation()); } }
apache/openwebbeans-meecrowave
1,083
integration-tests/webservices/src/main/java/org/apache/meecrowave/tests/webservices/Endpoint1.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.meecrowave.tests.webservices; import jakarta.enterprise.context.ApplicationScoped; import javax.jws.WebService; @WebService @ApplicationScoped public class Endpoint1 implements Contract1 { @Override public String foo() { return "foo"; } }
apache/openwebbeans-meecrowave
1,083
integration-tests/webservices/src/main/java/org/apache/meecrowave/tests/webservices/Endpoint2.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.meecrowave.tests.webservices; import jakarta.enterprise.context.ApplicationScoped; import javax.jws.WebService; @WebService @ApplicationScoped public class Endpoint2 implements Contract2 { @Override public String bar() { return "bar"; } }
apache/openwebbeans
1,094
webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/lifecycle/NotAnnotatedBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.test.interceptors.lifecycle; import jakarta.inject.Named; @Named("org.apache.webbeans.test.interceptors.lifecycle.NotAnnotatedBean") public class NotAnnotatedBean { public static boolean PC = false; public void sayHello() { } }
apache/openwebbeans
1,098
webbeans-impl/src/test/java/org/apache/webbeans/test/producer/beans/ProtectedProducedBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.test.producer.beans; import jakarta.enterprise.inject.Typed; /** * A sample bean which gets produced by a producer method with modifier 'protected' */ @Typed() public class ProtectedProducedBean { public int getMeaningOfLife() { return 42; } }
apache/ozhera
1,092
trace-etl/trace-etl-domain/src/main/java/org/apache/ozhera/trace/etl/domain/jaegeres/JaegerAttrType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ozhera.trace.etl.domain.jaegeres; public class JaegerAttrType { public static final String STRING = "string"; public static final String LONG = "int64"; public static final String BOOLEAN = "bool"; public static final String DOUBLE = "float64"; }
apache/ozone
1,112
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/ResponseStatus.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.ozone.recon.api.types; /** * Enum class for a path request's status. */ public enum ResponseStatus { OK, // Path exist INITIALIZING, // Recon is initializing PATH_NOT_FOUND, // Path not found TYPE_NOT_APPLICABLE // Path exists, but namespace is not applicable to request }
apache/plc4x
1,112
plc4j/drivers/canopen/src/test/java/org/apache/plc4x/java/canopen/CANOpenPayloadTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.canopen; import org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner; public class CANOpenPayloadTest extends ParserSerializerTestsuiteRunner { public CANOpenPayloadTest() { super("/protocols/canopen/CANOpenPayloadTestSuite.xml"); } }
apache/plc4x
1,113
plc4j/spi/src/main/java/org/apache/plc4x/java/spi/codegen/io/DataIoSerializerFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.spi.codegen.io; import org.apache.plc4x.java.api.value.PlcValue; import org.apache.plc4x.java.spi.generation.SerializationException; @FunctionalInterface public interface DataIoSerializerFunction<T> { void apply(T t, PlcValue value) throws SerializationException; }
apache/plc4x
1,124
plc4j/spi/src/main/java/org/apache/plc4x/java/spi/codegen/io/DataReaderEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.spi.codegen.io; import org.apache.plc4x.java.spi.generation.ParseException; import org.apache.plc4x.java.spi.generation.WithReaderArgs; public interface DataReaderEnum<T> extends DataReader<T> { T read(String logicalName, WithReaderArgs... readerArgs) throws ParseException; }
apache/poi
1,122
poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/shape/exceptions/StopVisiting.java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.xdgf.usermodel.shape.exceptions; public class StopVisiting extends RuntimeException { private static final long serialVersionUID = -4651207777092840750L; }
apache/poi
1,136
poi/src/main/java/org/apache/poi/poifs/crypt/standard/EncryptionRecord.java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.poifs.crypt.standard; import org.apache.poi.util.LittleEndianByteArrayOutputStream; public interface EncryptionRecord { void write(LittleEndianByteArrayOutputStream os); }
apache/polaris
1,122
runtime/defaults/src/main/java/org/apache/polaris/service/defaults/Readme.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.polaris.service.defaults; /** * This file is here as a placeholder to have some java content in the corresponding jar. Relevant * data is in the application.properties file at the root of the resources tree. */ @SuppressWarnings("unused") public final class Readme { private Readme() {} }
apache/polygene-java
1,082
tutorials/composites/src/main/java/org/apache/polygene/tutorials/composites/tutorial2/HelloWorldBehaviour.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.tutorials.composites.tutorial2; // START SNIPPET: solution /** * This interface contains only the behaviour * of the HelloWorld object. */ public interface HelloWorldBehaviour { String say(); } // END SNIPPET: solution
apache/polygene-java
1,082
tutorials/composites/src/main/java/org/apache/polygene/tutorials/composites/tutorial7/HelloWorldBehaviour.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.tutorials.composites.tutorial7; // START SNIPPET: solution /** * This interface contains only the behaviour * of the HelloWorld object. */ public interface HelloWorldBehaviour { String say(); } // END SNIPPET: solution
apache/polygene-java
1,110
manual/src/main/java/org/apache/polygene/manual/recipes/properties/SwingInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.manual.recipes.properties; import java.awt.Rectangle; import java.util.Locale; import javax.swing.Icon; // START SNIPPET: info public interface SwingInfo { Icon icon( Rectangle size ); String displayName( Locale locale ); } // END SNIPPET: info
apache/pulsar
1,084
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/BrokerSelectionStrategyFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.broker.loadbalance.extensions.strategy; import org.apache.pulsar.common.classification.InterfaceStability; @InterfaceStability.Stable public interface BrokerSelectionStrategyFactory { BrokerSelectionStrategy createBrokerSelectionStrategy(); }
apache/pulsar
1,090
pulsar-functions/java-examples/src/main/java/org/apache/pulsar/functions/api/examples/CustomBaseObject.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.functions.api.examples; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @AllArgsConstructor @NoArgsConstructor public class CustomBaseObject { private long baseValue; }
apache/pulsar
1,093
pulsar-client-tools-api/src/main/java/org/apache/pulsar/admin/cli/extensions/CommandExecutionContext.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.admin.cli.extensions; import java.util.Properties; import org.apache.pulsar.client.admin.PulsarAdmin; /** * Access to the Environment. */ public interface CommandExecutionContext { PulsarAdmin getPulsarAdmin(); Properties getConfiguration(); }
apache/qpid-broker-j
1,116
broker-core/src/main/java/org/apache/qpid/server/model/DoOnConfigThread.java
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.model; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface DoOnConfigThread { }
apache/reef
1,104
lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/bgd/parameters/Timeout.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.examples.group.bgd.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * Timeout. */ @NamedParameter(short_name = "timeout", default_value = "2") public final class Timeout implements Name<Integer> { }
apache/reef
1,105
lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/bgd/parameters/InputDir.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.examples.group.bgd.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * The input folder of the learner. */ @NamedParameter(short_name = "input") public final class InputDir implements Name<String> { }
apache/seatunnel
1,044
seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mongodb/sender/SerializableFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.connectors.seatunnel.cdc.mongodb.sender; import java.io.Serializable; import java.util.function.Function; @FunctionalInterface public interface SerializableFunction<T, R> extends Function<T, R>, Serializable {}
apache/seatunnel
1,045
seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/serialize/source/SeaTunnelRowDeserializer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.connectors.seatunnel.easysearch.serialize.source; import org.apache.seatunnel.api.table.type.SeaTunnelRow; public interface SeaTunnelRowDeserializer { SeaTunnelRow deserialize(EasysearchRecord rowRecord); }
apache/seatunnel
1,119
seatunnel-api/src/main/java/org/apache/seatunnel/api/event/EventHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.api.event; import java.io.Serializable; public interface EventHandler extends Serializable, AutoCloseable { /** * Receive and handle the event data. * * @param event */ void handle(Event event); @Override default void close() throws Exception {} }
apache/servicecomb-pack
1,065
integration-tests/pack-tests/src/test/java/org/apache/servicecomb/pack/integration/tests/resttemplate/CommandEnvelopeRepository.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.pack.integration.tests.resttemplate; import org.apache.servicecomb.pack.alpha.core.Command; import org.springframework.data.repository.CrudRepository; interface CommandEnvelopeRepository extends CrudRepository<Command, Long> { }
apache/servicecomb-samples
1,082
java-chassis-integration-tests/it-producer/src/main/java/org/apache/servicecomb/it/schema/EmptyScheam.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.it.schema; import org.apache.servicecomb.provider.rest.common.RestSchema; import org.springframework.web.bind.annotation.RequestMapping; @RestSchema(schemaId = "EmptyScheam") @RequestMapping(path = "/v1/EmptyScheam") public class EmptyScheam { }
apache/shardingsphere
1,041
kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/incremental/wal/event/PlaceholderEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.data.pipeline.postgresql.ingest.incremental.wal.event; import lombok.ToString; /** * Placeholder event. */ @ToString(callSuper = true) public final class PlaceholderEvent extends AbstractWALEvent { }
apache/shardingsphere
1,073
infra/common/src/main/java/org/apache/shardingsphere/infra/rule/attribute/resoure/StorageConnectorReusableRuleAttribute.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.infra.rule.attribute.resoure; import org.apache.shardingsphere.infra.rule.attribute.RuleAttribute; /** * Storage connector reusable rule attribute. */ public interface StorageConnectorReusableRuleAttribute extends RuleAttribute { }
apache/shardingsphere
1,088
test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/dialect/oracle/OracleBinderIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.test.it.sql.binder.dialect.oracle; import org.apache.shardingsphere.test.it.sql.binder.SQLBinderIT; import org.apache.shardingsphere.test.it.sql.binder.SQLBinderITSettings; @SQLBinderITSettings("Oracle") class OracleBinderIT extends SQLBinderIT { }
apache/shiro
1,109
samples/spring-boot-3-web/src/main/java/org/apache/shiro/samples/LoginController.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.shiro.samples; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class LoginController { @RequestMapping("/login.html") public String loginTemplate() { return "login"; } }
apache/sis
1,102
endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/base/Resources_fr.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.storage.geotiff.base; /** * Messages in French language. */ public class Resources_fr extends Resources { /** * Constructs a new resource bundle loading data from * the resource file of the same name as this class. */ public Resources_fr() { } }
apache/skywalking-java
1,057
test/plugin/scenarios/servicecomb-1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/servicecomb/schema/models/Person.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.testcase.servicecomb.schema.models; public class Person { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
apache/skywalking-java
1,058
test/plugin/scenarios/jsonrpc4j-1.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/jsonrpc4j/services/DemoServiceImp.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.testcase.jsonrpc4j.services; import org.springframework.stereotype.Service; @Service public class DemoServiceImp implements DemoService { @Override public String sayHello() { return "hello"; } }
apache/skywalking
1,099
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/UnexpectedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core; public class UnexpectedException extends RuntimeException { public UnexpectedException(String message) { super(message); } public UnexpectedException(String message, Exception cause) { super(message, cause); } }
apache/solr
1,114
solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/OverseerOperationPayload.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.client.solrj.request.beans; import org.apache.solr.common.annotation.JsonProperty; import org.apache.solr.common.util.ReflectMapWriter; public class OverseerOperationPayload implements ReflectMapWriter { @JsonProperty public String op; @JsonProperty public String electionNode; }
apache/solr
1,128
solr/api/src/java/org/apache/solr/client/api/model/ReloadCoreRequestBody.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.client.api.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; public class ReloadCoreRequestBody { @Schema(description = "Request ID to track this action which will be processed asynchronously.") @JsonProperty public String async; }
apache/storm
1,132
storm-client/src/jvm/org/apache/storm/metric/api/AssignableMetric.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.metric.api; public class AssignableMetric implements IMetric { Object value; public AssignableMetric(Object value) { this.value = value; } public void setValue(Object value) { this.value = value; } @Override public Object getValueAndReset() { return value; } }
apache/stratos
1,060
components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/payload/LoadBalancerCartridgePayloadData.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.autoscaler.applications.payload; public class LoadBalancerCartridgePayloadData extends PayloadData { public LoadBalancerCartridgePayloadData(BasicPayloadData basicPayloadData) { super(basicPayloadData); } }
apache/streampipes
1,098
streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/constants/PeType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.smp.constants; public enum PeType { ADAPTER("Adapter"), PROCESSOR("Data Processor"), SINK("Data Sink"); private String friendly; PeType(String friendly) { this.friendly = friendly; } public String getFriendly() { return friendly; } }
apache/syncope
1,098
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/am/WAConfigEntry.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.core.persistence.api.entity.am; import java.util.List; import org.apache.syncope.core.persistence.api.entity.ProvidedKeyEntity; public interface WAConfigEntry extends ProvidedKeyEntity { List<String> getValues(); void setValues(List<String> value); }
apache/tajo
1,094
tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/exception/UnknownCodecException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.storage.exception; public class UnknownCodecException extends Exception { private static final long serialVersionUID = 4287230843540404529L; public UnknownCodecException() { } public UnknownCodecException(String message) { super(message); } }
apache/tapestry-5
1,103
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/Internal.java
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.internal.services.javascript; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Marker annotation for the internal {@link org.apache.tapestry5.services.javascript.JavaScriptStack}. * * @since 5.4 */ @Target( {ElementType.PARAMETER, ElementType.FIELD, ElementType.METHOD}) @Retention(RUNTIME) @Documented public @interface Internal { }
apache/tapestry-5
1,116
tapestry-http/src/main/java/org/apache/tapestry5/http/services/RequestFilter.java
// Copyright 2006, 2007, 2008, 2009 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.http.services; import java.io.IOException; /** * Filter interface for {@link org.apache.tapestry5.http.services.RequestHandler}. Implementations of this interface may be * contributed into the RequestHandler service configuration. */ public interface RequestFilter { /** * Returns true if the request has been handled, false otherwise. */ boolean service(Request request, Response response, RequestHandler handler) throws IOException; }
apache/tapestry-5
1,118
tapestry-core/src/main/java/org/apache/tapestry5/validator/Unchecked.java
// Copyright 2018 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.validator; import org.apache.tapestry5.services.Html5Support; import org.apache.tapestry5.services.javascript.JavaScriptSupport; /** * A validator that enforces that the value is false. This validator is not configurable. * * @since 5.5.0 */ public final class Unchecked extends CheckboxValidator { public Unchecked(JavaScriptSupport javaScriptSupport, Html5Support html5Support) { super(javaScriptSupport, "unchecked", Boolean.FALSE, "unchecked"); } }
apache/thrift
1,141
lib/java/src/main/java/org/apache/thrift/scheme/IScheme.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.thrift.scheme; import org.apache.thrift.TBase; public interface IScheme<T extends TBase> { void read(org.apache.thrift.protocol.TProtocol iproto, T struct) throws org.apache.thrift.TException; void write(org.apache.thrift.protocol.TProtocol oproto, T struct) throws org.apache.thrift.TException; }
apache/tika
1,133
tika-core/src/main/java/org/apache/tika/sax/xpath/ElementMatcher.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tika.sax.xpath; /** * Final evaluation state of an XPath expression that targets an element. * Matches the current element. */ public class ElementMatcher extends Matcher { public static final Matcher INSTANCE = new ElementMatcher(); public boolean matchesElement() { return true; } }
apache/tinkerpop
1,098
gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/jsr223/GroovyGremlinScriptEngineTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tinkerpop.gremlin.jsr223; import org.junit.runner.RunWith; /** * @author Stephen Mallette (http://stephen.genoprime.com) */ @RunWith(GremlinScriptEngineSuite.class) @ScriptEngineToTest(scriptEngineName = "gremlin-groovy") public class GroovyGremlinScriptEngineTest { }
apache/tomcat
1,147
java/org/apache/catalina/webresources/war/Handler.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.webresources.war; import java.io.IOException; import java.net.URL; import java.net.URLConnection; import java.net.URLStreamHandler; public class Handler extends URLStreamHandler { @Override protected URLConnection openConnection(URL u) throws IOException { return new WarURLConnection(u); } }
apache/tomee
1,108
server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/NoResourcesFoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.server.cxf.rs; public class NoResourcesFoundException extends IllegalArgumentException { public NoResourcesFoundException(final ApplicationData applicationData) { super("Application must contain at least one JAX-RS resource class: " + applicationData); } }
apache/tomee
1,111
container/openejb-junit/src/main/java/org/apache/openejb/junit/jee/resources/TestResource.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.junit.jee.resources; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface TestResource { }
apache/tomee
1,112
examples/cdi-ejbcontext-jaas/src/main/java/org/superbiz/cdi/ejbcontext/PrinciaplEjb.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.cdi.ejbcontext; import jakarta.annotation.Resource; import jakarta.ejb.EJBContext; import jakarta.ejb.Stateless; @Stateless public class PrinciaplEjb { @Resource private EJBContext context; public String info() { return context.getCallerPrincipal().getName(); } }
apache/tomee
1,116
examples/movies-complete-meta/src/main/java/org/superbiz/injection/tx/api/Metatype.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.injection.tx.api; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Metatype @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.ANNOTATION_TYPE) public @interface Metatype { }
apache/tsfile
1,116
java/tsfile/src/main/java/org/apache/tsfile/exception/NotImplementedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tsfile.exception; public class NotImplementedException extends RuntimeException { private static final long serialVersionUID = 6455048223316780984L; public NotImplementedException() { super(); } public NotImplementedException(String message) { super(message); } }
apache/uima-uimaj
1,100
uimafit-examples/src/main/java/org/apache/uima/fit/examples/experiment/pos/ViewNames.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.uima.fit.examples.experiment.pos; public class ViewNames { public static final String GOLD_VIEW = "GOLD_VIEW"; public static final String SYSTEM_VIEW = "SYSTEM_VIEW"; public static final String VIEW1 = "VIEW1"; public static final String VIEW2 = "VIEW2"; }
apache/uima-uimaj
1,120
uimaj-core/src/main/java/org/apache/uima/spi/FsIndexCollectionProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.uima.spi; import java.util.List; import org.apache.uima.resource.metadata.FsIndexCollection; /** * @deprecated Use {@link TypeSystemProvider} instead. * @forRemoval 4.0.0 */ @Deprecated public interface FsIndexCollectionProvider { List<FsIndexCollection> listFsIndexCollections(); }
apache/usergrid
1,125
chop/spi/src/main/java/org/apache/usergrid/chop/spi/LaunchResult.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.usergrid.chop.spi; import org.apache.usergrid.chop.stack.Instance; import org.apache.usergrid.chop.stack.InstanceSpec; /** * Results of launching an instance. */ public interface LaunchResult { int getCount(); InstanceSpec getInstanceSpec(); Iterable<Instance> getInstances(); }
apache/wicket
1,093
wicket-core-tests/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.resolver.issue3559; import org.apache.wicket.markup.html.panel.Panel; /** * */ public class SimplePanel extends Panel { private static final long serialVersionUID = 1L; /** * * @param id */ public SimplePanel(String id) { super(id); } }
apache/wicket
1,095
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/testing2/TestBasePage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.html.header.testing2; import org.apache.wicket.markup.html.WebPage; /** * * @author Juergen Donnerstag */ public class TestBasePage extends WebPage { private static final long serialVersionUID = 1L; /** * Construct. */ TestBasePage() { } }
apache/wicket
1,096
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/TransparentWithAjaxUpdatePanel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.html; import org.apache.wicket.markup.html.panel.Panel; class TransparentWithAjaxUpdatePanel extends Panel { private static final long serialVersionUID = 1L; public TransparentWithAjaxUpdatePanel(String id) { super(id); setOutputMarkupId(true); } }
apache/wicket
1,098
wicket-core-tests/src/test/java/org/apache/wicket/component/replacewith/ReplaceInConstructorPanel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.component.replacewith; /** * A panel that uses #replaceWith in #onBeforeRender */ class ReplaceInConstructorPanel extends BaseReplaceWithPanel { public ReplaceInConstructorPanel(String id) { super(id); replaceWith(new PanelB(getId())); } }
google-ar/arcore-android-sdk
1,063
samples/hardwarebuffer_java/app/src/main/java/com/google/ar/core/examples/java/helloarhardwarebuffer/JniInterface.java
/* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.ar.core.examples.java.helloarhardwarebuffer; /** JNI interface to native layer. */ public class JniInterface { static { System.loadLibrary("hello_ar_hardwarebuffer_native"); } private static final String TAG = "JniInterface"; public static native long createEglImage(Object buffer); public static native void destroyEglImage(long imageAddress); public static native void bindEglImageToTexture(long imageAddress, long textureId); }
google-checks/checks-jenkins-plugin
1,099
src/main/java/io/jenkins/plugins/googlechecks/models/GoogleChecksCheck.java
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package io.jenkins.plugins.googlechecks.models; import com.google.api.client.json.GenericJson; import com.google.api.client.util.Key; public final class GoogleChecksCheck extends GenericJson { @Key public String type; @Key public String state; @Key public String severity; public GoogleChecksCheck() { } public GoogleChecksCheck(String type, String state, String severity) { this.type = type; this.state = state; this.severity = severity; } }
google-developer-training/android-advanced
1,077
PropertyAnimation/app/src/main/java/com/example/android/propertyanimation/MainActivity.java
/* * Copyright (C) 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.propertyanimation; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; /** * Demonstrates property animation with ObjectAnimator and AnimatorSet. * Shows an expanding and contracting circle. */ public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
google/binnavi
1,084
src/main/java/com/google/security/zynamics/binnavi/Gui/FilterPanel/FilterExpressions/Wrappers/INamedElement.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.Gui.FilterPanel.FilterExpressions.Wrappers; /** * Interface used to describe database objects that have both a name and a description. */ public interface INamedElement { /** * Returns the description of the named element. * * @return The description of the named element. */ String getDescription(); /** * Returns the name of the named element. * * @return The name of the named element. */ String getName(); }
google/caliper
1,127
caliper-util/src/test/java/com/google/caliper/util/UuidsTest.java
/* * Copyright (C) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.caliper.util; import static com.google.common.truth.Truth.assertThat; import java.nio.ByteBuffer; import java.util.UUID; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** Tests for {@link Uuids}. */ @RunWith(JUnit4.class) public final class UuidsTest { @Test public void uuidRoundTrip() throws Exception { UUID id = UUID.randomUUID(); ByteBuffer bytes = Uuids.toBytes(id); UUID id2 = Uuids.fromBytes(bytes); assertThat(id2).isEqualTo(id); } }
google/depan
1,121
DepanJava/prod/src/com/google/devtools/depan/java/graph/JavaElementVisitor.java
/* * Copyright 2007 The Depan Project Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.devtools.depan.java.graph; import com.google.devtools.depan.model.ElementVisitor; /** * @author ycoppel@google.com (Yohann Coppel) * */ public interface JavaElementVisitor extends ElementVisitor { public void visitFieldElement(FieldElement element); public void visitInterfaceElement(InterfaceElement element); public void visitMethodElement(MethodElement element); public void visitPackageElement(PackageElement element); public void visitTypeElement(TypeElement element); }
google/jsinterop-generator
1,130
java/jsinterop/generator/model/TypeQualifier.java
/* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * */ package jsinterop.generator.model; import com.google.j2cl.common.visitor.Processor; import com.google.j2cl.common.visitor.Visitable; /** Represents an expression to a type qualifier. */ @Visitable public class TypeQualifier extends Expression { @Visitable TypeReference type; public TypeQualifier(TypeReference type) { this.type = type; } public TypeReference getType() { return type; } @Override Expression acceptInternal(Processor processor) { return Visitor_TypeQualifier.visit(processor, this); } }
google/nomulus
1,129
core/src/main/java/google/registry/model/domain/rgp/package-info.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. @XmlSchema( namespace = "urn:ietf:params:xml:ns:rgp-1.0", xmlns = @XmlNs(prefix = "rgp", namespaceURI = "urn:ietf:params:xml:ns:rgp-1.0"), elementFormDefault = XmlNsForm.QUALIFIED) @XmlAccessorType(XmlAccessType.FIELD) package google.registry.model.domain.rgp; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlNs; import jakarta.xml.bind.annotation.XmlNsForm; import jakarta.xml.bind.annotation.XmlSchema;
google/sagetv
1,149
java/sage/vfs/SimpleNodeView.java
/* * Copyright 2015 The SageTV Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package sage.vfs; /** * * @author Narflex */ public class SimpleNodeView extends BasicMediaSource { /** Creates a new instance of SimpleNodeView */ public SimpleNodeView() { } public void setRootNode(MediaNode rootNode) { root = rootNode; } public MediaNode createVFS() { return root; } public MediaNode createRelativeVFS(Object relativeRoot) { return root; } public MediaNode createCollectionVFS(java.util.Vector dataObjects) { return root; } private MediaNode root; }
googleapis/google-cloud-java
1,033
java-maps-routeoptimization/proto-google-maps-routeoptimization-v1/src/main/java/com/google/maps/routeoptimization/v1/BatchOptimizeToursMetadataOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/maps/routeoptimization/v1/route_optimization_service.proto // Protobuf Java Version: 3.25.8 package com.google.maps.routeoptimization.v1; public interface BatchOptimizeToursMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.maps.routeoptimization.v1.BatchOptimizeToursMetadata) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,033
java-maps-routeoptimization/proto-google-maps-routeoptimization-v1/src/main/java/com/google/maps/routeoptimization/v1/BatchOptimizeToursResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/maps/routeoptimization/v1/route_optimization_service.proto // Protobuf Java Version: 3.25.8 package com.google.maps.routeoptimization.v1; public interface BatchOptimizeToursResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.maps.routeoptimization.v1.BatchOptimizeToursResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,035
java-analytics-admin/proto-google-analytics-admin-v1beta/src/main/java/com/google/analytics/admin/v1beta/AcknowledgeUserDataCollectionResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/analytics/admin/v1beta/analytics_admin.proto // Protobuf Java Version: 3.25.8 package com.google.analytics.admin.v1beta; public interface AcknowledgeUserDataCollectionResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,038
java-discoveryengine/proto-google-cloud-discoveryengine-v1/src/main/java/com/google/cloud/discoveryengine/v1/BatchVerifyTargetSitesResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/discoveryengine/v1/site_search_engine_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.discoveryengine.v1; public interface BatchVerifyTargetSitesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1.BatchVerifyTargetSitesResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,041
java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DeleteConversationDatasetOperationMetadataOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/dialogflow/v2/conversation_dataset.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.dialogflow.v2; public interface DeleteConversationDatasetOperationMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata) com.google.protobuf.MessageOrBuilder {}
googlearchive/caja
1,143
src/com/google/caja/parser/ParseTreeNodeVisitor.java
// Copyright (C) 2012 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.caja.parser; /** * Callback for visiting a {@link ParseTreeNode} tree, used by * {@link ParseTreeNode#visitPreOrder}. * <p> * This is different from {@link Visitor} in that the node argument * is a ParseTreeNode, not an AncestorChain, so the visitor does * not know what the node's parent is. */ public interface ParseTreeNodeVisitor { /** * Called to visit each node in a ParseTreeNode tree. * @return Whether to continue. Returning false will stop traversal. */ public boolean visit(ParseTreeNode node); }
googlearchive/leanback-showcase
1,066
app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/room/di/listener/ListenerModuleKey.java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.support.v17.leanback.supportleanbackshowcase.app.room.di.listener; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import dagger.MapKey; @Documented @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @MapKey @interface ListenerModuleKey { Class value(); }
hibernate/hibernate-demos
1,042
openshift/message-board/account-micro/src/main/java/org/hibernate/demo/account/UserService.java
package org.hibernate.demo.account; import java.util.List; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.transaction.Transactional; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; @Path("/user") @RequestScoped @Transactional @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class UserService { @Inject private UserRepo repo; @GET @Path("all") public List<User> findAllUsers() { return repo.findAll(); } @GET public User findByUsername(@QueryParam("username") String username) { return repo.findByUserName( username ); } @POST public User createNewUser(User user) { repo.add( user ); return user; } @DELETE @Path("username/{username}") public void delete(@PathParam("username") String username) { repo.delete( username ); } }
hibernate/hibernate-ogm
1,078
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/impl/GeoCollectionGridType.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.mongodb.type.impl; import org.hibernate.MappingException; import org.hibernate.engine.spi.Mapping; import org.hibernate.ogm.datastore.mongodb.type.GeoCollection; import org.hibernate.ogm.type.impl.AbstractGenericBasicType; /** * Persists {@link GeoCollection} in the format expected by MongoDB. * * @author Aleksandr Mylnkov */ public class GeoCollectionGridType extends AbstractGenericBasicType<GeoCollection> { public static final GeoCollectionGridType INSTANCE = new GeoCollectionGridType(); public GeoCollectionGridType() { super( GeoCollectionGridTypeDescriptor.INSTANCE, GeoCollectionTypeDescriptor.INSTANCE ); } @Override public int getColumnSpan(Mapping mapping) throws MappingException { return 1; } @Override public String getName() { return "geocollection"; } }
hibernate/hibernate-orm
1,039
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/ImplicitBasicTypeTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.basic; import jakarta.persistence.Entity; import jakarta.persistence.Id; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; /** * @author Vlad Mihalcea */ public class ImplicitBasicTypeTest extends BaseEntityManagerFunctionalTestCase { @Override protected Class<?>[] getAnnotatedClasses() { return new Class<?>[] { Product.class }; } @Test public void test() { doInJPA(this::entityManagerFactory, entityManager -> { Product product = new Product(); product.id = 1; entityManager.persist(product); }); } //tag::basic-annotation-implicit-example[] @Entity(name = "Product") public class Product { @Id private Integer id; private String sku; private String name; private String description; } //end::basic-annotation-implicit-example[] }
hibernate/hibernate-orm
1,060
hibernate-core/src/test/java/org/hibernate/orm/test/orphan/onetomany/Product.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.orphan.onetomany; import java.util.ArrayList; import java.util.List; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; @Entity @Table(name="product") public class Product { @Id @GeneratedValue(strategy= GenerationType.AUTO) private Long id; @OneToMany(mappedBy = "product", orphanRemoval = true) //, cascade ={CascadeType.PERSIST} private List<Feature> features = new ArrayList<Feature>(); private String name; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<Feature> getFeatures() { return features; } public void setFeatures(List<Feature> features) { this.features = features; } }
hibernate/hibernate-orm
1,069
hibernate-envers/src/main/java/org/hibernate/envers/boot/registry/classloading/ClassLoaderAccessHelper.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.envers.boot.registry.classloading; import org.hibernate.boot.registry.classloading.spi.ClassLoadingException; import org.hibernate.boot.spi.ClassLoaderAccess; import org.hibernate.envers.boot.spi.EnversMetadataBuildingContext; /** * Utility class that facilitates loading of a class. * * @author Chris Cranford */ public final class ClassLoaderAccessHelper { /** * Loads a class by name. * * @param metadataBuildingContext the metadata building context * @param className the class to be loaded * @return the loaded class instance * @throws ClassLoadingException if there was an error loading the named class */ public static Class<?> loadClass(EnversMetadataBuildingContext metadataBuildingContext, String className) { ClassLoaderAccess classLoaderAccess = metadataBuildingContext.getBootstrapContext().getClassLoaderAccess(); return classLoaderAccess.classForName( className ); } private ClassLoaderAccessHelper() { } }
hibernate/hibernate-orm
1,081
hibernate-core/src/main/java/org/hibernate/query/criteria/JpaXmlElementExpression.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.query.criteria; import java.util.List; import org.hibernate.Incubating; import jakarta.persistence.criteria.Expression; /** * A special expression for the {@code xmlelement} function. * @since 7.0 */ @Incubating public interface JpaXmlElementExpression extends JpaExpression<String> { /** * Passes the given {@link Expression} as value for the XML attribute with the given name. * * @return {@code this} for method chaining */ JpaXmlElementExpression attribute(String attributeName, Expression<?> expression); /** * Passes the given {@link Expression}s as value for the XML content of this element. * * @return {@code this} for method chaining */ JpaXmlElementExpression content(List<? extends Expression<?>> expressions); /** * Passes the given {@link Expression}s as value for the XML content of this element. * * @return {@code this} for method chaining */ JpaXmlElementExpression content(Expression<?>... expressions); }
hibernate/hibernate-search
1,048
mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/mapping/definition/programmatic/ConstructorMappingStep.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.mapper.pojo.mapping.definition.programmatic; /** * The step in a mapping definition where a constructor can be mapped. */ public interface ConstructorMappingStep { /** * @return A DSL step where the mapping can be defined * for the type hosting this constructor. */ TypeMappingStep hostingType(); /** * Marks the constructor to use for projections from an index object (root or object field) to a Java object. * @see org.hibernate.search.mapper.pojo.mapping.definition.annotation.ProjectionConstructor * @return {@code this}, for method chaining. */ ConstructorMappingStep projectionConstructor(); /** * Starts the definition of the mapping of a specific constructor parameter. * * @param index The zero-based index of the parameter in this constructor. * @return A DSL step where the property mapping can be defined in more details. */ MethodParameterMappingStep parameter(int index); }
openjdk/jdk8
1,119
jaxp/src/com/sun/org/apache/xerces/internal/xinclude/XPointerSchema.java
package com.sun.org.apache.xerces.internal.xinclude; import com.sun.org.apache.xerces.internal.xni.parser.XMLComponent; import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentFilter; public interface XPointerSchema extends XMLComponent, XMLDocumentFilter{ /** * set the Schema Name eg element , xpointer */ public void setXPointerSchemaName(String schemaName); /** * Return Schema Name eg element , xpointer * */ public String getXpointerSchemaName(); /** * Parent Contenhandler for the this contenthandler. * // not sure about the parameter type. It can be Contenthandler instead of Object type. */ public void setParent(Object parent); /** * return the Parent Contenthandler */ public Object getParent(); /** * Content of the XPointer Schema. Xpath to be resolved. */ public void setXPointerSchemaPointer(String content); /** * Return the XPointer Schema. */ public String getXPointerSchemaPointer(); public boolean isSubResourceIndentified(); public void reset(); }